Never been to TextSnippets before?
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
Look for the following in the output:
LookupOrder: Cache FF DNS NI DS _config_name: Host Configuration
The FF (flat file) refers to your hosts file (/etc/hosts), and Tiger does check its contents before going to DNS and Netinfo. Just a little FYI for those who may not have realized that 10.4 fixed things.
hdiutil burn image.iso
defaults write com.apple.iTunes invertStoreLinks -bool YES
This makes those little right-pointing arrows in iTunes point to your library, not the iTunes Store. If you want the iTunes Store, Option-click instead.
in Ubuntu, just add
send host-name "dapperbox";
to your /etc/dhcp3/dhclient.conf file
you might need to do a
sudo /etc/services/networking restart
On your Mac, you can now do
sudo pmset -a disksleep 0 sleep 0
install darwinports package Add 'export PATH=/opt/local/bin:$PATH' to ~/.bashrc sudo port -d selfupdate sudo port install ruby sudo port install rb-rubygems sudo gem install rails --include-dependencies sudo port install readline sudo port install lighttpd vi /opt/local/etc/lighttpd.conf [edit lighttpd.conf to your liking] set up launchd item for lighttpd -- restart lighttpd: sudo launchctl stop net.lighttpd sudo launchctl start net.lighttpd sudo port install fcgi sudo port install rb-fcgi install official OS X MySQL package (not darwinports) sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
OS X MySQL package
2) Add hourly job:
$RAILS_APP_DIR/script/runner 'ActiveRecord::Base.connection.delete("DELETE FROM sessions WHERE updated_at < now() - INTERVAL 1 HOUR")'
3) My launchd task plist file (yours will vary):
<?xml version="1.0" encoding="UTF-8"?> DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Labelkey>
us.boygeni.mysql-session-sweeper</string> <key>LowPriorityIOkey> /> <key>ProgramArgumentskey> /users/defeated/Sites/rails_apps/boygenius/script/runnerstring> 'ActiveRecord::Base.connection.delete("DELETE FROM sessions WHERE updated_at < now() - INTERVAL 1 HOUR")'</string> array> RunAtLoad</key> <true/> <key>StartIntervalkey> 3600</integer> dict> </plist>
<input type="search" name="blah" value="Search"/>
To use gcc 3.3 :
sudo gcc_select 3.3
To revert to gcc 4.0 :
sudo gcc_select 4.0
(found on the forum, thanks Damelon!)
I had to reinstall Mysql because it wasn�t one of the things I backed up before erasing my hard drive. Since I�m now running Mac OS X 10.4 �Tiger�, I decided to set it up to start when the system boots, but the system for creating startup items has changed slightly. So I saved the following xml in /Library/LaunchDaemons/com.mysql.Mysql.plist:
<?xml version="1.0" encoding="UTF-8"?> DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" " http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Labelkey>
com.mysql.Mysql</string> <key>OnDemandkey> /> <key>ProgramArgumentskey> /usr/local/mysql/bin/mysqld_safestring> </array> <key>ServiceDescriptionkey> Mysql 4.1 Database Server</string> <key>UserNamekey> mysql</string> <key>WorkingDirectorykey> /usr/local/mysqlstring> </dict> plist>
Note that I'm using the official OSX distribution of MySQL... but with a few changes to match your database location, you can get this to work with other installs (fink, darwinports, etc).