Welcome To Snipplr


Everyone's Recent Snippets Tagged osx



Remove all the keys of the application’s preferences file from ~/Library/Preferences with Cocoa’s NSUserDefaults class.
2 1979 posted 17 years ago by zingo
Place this in your ~/.bash_profile then type tab in your terminal window to see some magic happen.
0 1368 posted 17 years ago by zingo
Using a gcc predefined macro, __DATE__, the code can know for itself when it was compiled, and build in an expiration date based on that value. The former code (http://snipplr.com/view/3448/kill-app-after-expire-date/) was not internationalised an...
5 2968 posted 17 years ago by zingo
When installing mysql and mysql-dev with fink, gem is unable to find the mysql headers and libraries: you should specify their location. If compiled manually from source, gem will find it if /usr/local/mysql (or what ever other location you specified...
0 1298 posted 17 years ago by iblis
1 1536 posted 17 years ago by mikegreen
This can be used to test FS type.
1 1982 posted 17 years ago by zingo
Note: most of these will be available to the shell and Rails' console too.
2 1633 posted 17 years ago by cczona
1 1414 posted 17 years ago by sou
recover to normal speed with /sbin/ipfw delete 100 /sbin/ipfw delete 200 ... or reboot
0 1538 posted 17 years ago by zingo
This command will not delete the .DS_Store files from the file system, just take them out of version control. Before doing this it would be a good idea to setup the repository to ignore .DS_Store files.
1 2439 posted 17 years ago by jachin
0 1638 posted 17 years ago by zingo
0 1474 posted 17 years ago by zingo
0 1511 posted 17 years ago by zingo
2 1729 posted 17 years ago by zingo
Macro to give an asl_log-like NSLog.
2 1900 posted 17 years ago by zingo
When Apache under OS X throws 'Forbidden' errors on files under the ~/Sites path, and the error log report 'Permission denied: access to /somefile/blah failed because search permissions are missing on a component of the path', check a missing Other E...
1 1797 posted 17 years ago by cczona
A very dynamic and flexible bash prompt. Personally I find this to have everything needed. It shows exit status, shortens itself for long directories, and shows bash history for easy referencing. Hopefully it doesn't get messed up.
2 1514 posted 17 years ago by robh
4 2554 posted 18 years ago by zingo
A database table is basically an array of dictionary objects. As long as all the fields are valid property list types, you can loop through the array creating a managed object for each dictionary and setting the values. If you have an array con...
2 1903 posted 18 years ago by zingo
0 1317 posted 18 years ago by benpjohnson
After: sudo port -v selfupdate Update outdated ports with: sudo port upgrade outdated
1 1588 posted 18 years ago by rhockens
After installing MacPorts, try running a selfupdate to grab all the latest MacPorts Portfiles (Portfiles contain information about how to install MacPorts software "ports"). You will need to run this command as an administrator, and it requires root...
0 1184 posted 18 years ago by rhockens
[quote] Verbose booting shows you the actual process of Mac OS X's startup. You'll see drivers get loaded and services launch. This command should work on any recent (New World) Macintosh: sudo /usr/sbin/nvram boot-args="-v". The -v flag tells the s...
0 1240 posted 18 years ago by rhockens
"...UNIX systems run scheduled maintenance routines — known as maintenance scripts — to clean up a variety of System logs and temporary files. By default, these are executed between 03:15 and 05:30 hours local time, depending on the script. If...
1 1482 posted 18 years ago by rhockens
Prints content from an NSError or NSArray content from a managedObjectContext.
0 1494 posted 18 years ago by zingo
List the current version and installation date of every application on a OS X system, using of Spotlight.
1 1230 posted 18 years ago by zingo