Menu Icons
So I was trying to remove my airport icon from my menu bar after migrating settings from mac-air. After 20 minutes of googling found you can command drag unwanted icons of menubar and poof they're gone.
Leopard HIDD Problem
Annoying problem causing syslogd to use 100% cpu and overheat MacBook Air
First of all I needed to realise that the problem was not with syslogd, but instead was with a process using syslogd to excess. A couple of interesting things were learnt here.
Use of Console Application
Located in Applications/Utilities the console app allows you to view all of the key log files on your system. The important thing is to expand the tree on the left hand side of the application. The most important log files for this particular problem are in /var/log and system.log is the main source of information.
Stopping and Starting Syslogd
Stopping syslogd is generally a very bad idea. Its done by
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist
and is restarted by
sudo launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist
Emptying Log Files and Database
Syslogd uses a database file "/var/log/asl.db". If you're getting logging problems this can get very big. You can remove it, and it will be recreated by syslogd when that next starts (maybe immediately).
"/var/log/system.log" can also get very big when these sort of problems happen. In this case you may need to recreate the file when you delete it
sudo rm /var/log/system.log
touch !$
ls !$
HIDD is the Problem
On my machine I was getting thousands of errors like this
/usr/libexec/hidd36: IOHIDEventQueueEnqueue: Error enqueuing memory. (0xe00002e8)
HIDD stands for something like Human Interface Device Daemon. As a process it is fundamental to the Mac, as the keyboard and mouse won't work without it. However you can kill it - it will immediately restart
sudo killall hidd
On my machine this seems to have cured my runaway logging problems for now :)
MySql for Rails on OSX Leopard
As of now, this is much simpler than many blog posts make out.
I downloaded the OSX .dmg from http://dev.mysql.com/downloads/mysql/5.0.html#macosx-dmg, double clicked on the .dmg and installed
- mysql package
- mysql startup
- mysql preference pane
Then
- went to "system preferences" and started the server using the preference pane.
- ensured my path included "/usr/local/mysql/bin"
- checked local installation by running "mysql -u root" from a terminal
Installing the MySql Gem
This has following pre-requisites
- Installation of XCode
- Installation of MySql and ability to find mysql_config
I ran the following command
sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
and the Gem installed fine
Finally tested by creating sample application
rails mysql-test -d mysql
Then in newly created folder
rake db:create:all
Then check databases exist in MySQL using "show databases;".
Mac Air Keyboard Layout
The keyboard layout on the MacAir is a bit of a pain in the arse, mainly because of the absence of a convenient hash key. So I need to put together a custom keyboard layout to sort this out.
This is actually really easy to do ... once you know how to do it!
- download Ukelele
- mount/open the disk image (double click the .dmg file)
- open the british keyboard layout in the folder "System Keyboards/Roman" in the disk image
- system preferences|international
- choose Input Menu and select character palette (the first entry)
- in your menu bar click on the country flag and select show character palette.
- select punctuation and drag the # key over the ยง key on the keyboard
- save the layout as 'british-with-hash.layout' in "/Library/Keyboard\ Layouts"
- go back to "system preferences|international|input menu" and select your new "british-with-hash" layout
- use the menu bar to select your new layout
n.b. after saving the layout you may have to logout and in for the new layout to be recognised
Teminal App Colours
Terminal App Colors
Basic problem is default blue in terminal is very difficult to read. Two approaches to this problem
- Configure Bash to to use the default blue color
- Configure your terminal application so the default blue color is rendered more legibly.
This SIMBL plugin takes the second approach adding a color picker to terminal so you can change how any ANSI color is rendered
Safari Advert Blocker
Safari Advert Blocker
Installed Pith Helmet which is a $10 shareware advert blocker and general bling tool for Safari. Evaluating this at the moment, seems quite promising.
Part of this is SIMBL One cool plugin for this thing is the configuration of colors for terminal.
OSX CUPS Client
OSX comes with Cups installed, so you can connect on localhost:631 and add the printer on little-un, using Add Printer. However browsing and discovery of printers doesn't work, so you have to get the correct address
Finding Correct Printer path
Log into the CUPS interface on your linux box. (My path was http://192.168.0.2:631/printers/) Right click the "Print test page" button and "Copy Link Location"
Use this to create your correct path (remove cruft at end first)
Mine ended up being
http://192.168.0.2:631/printers/Kyocera_FS-1020D_USB_1
With the correct path the printer installs easily and works from applications. You can also see the printer in System Preferences | Print & Fax, so you don't have to use the web interface anymore.
Only took me 4hrs