MacPorts: Getting MySQL5 to launch at startup

September 18, 2008

So if your like me and forgot to specify the +server argument to the port install command and your stuck starting it up manually everytime you boot your mac, and were to lazy to find out how and/or reinstall the port with the f***ing +server argument, Batman to the rescue!!!! I mean Kevin to the Rescue!

It’s actually quite easy.

Before we start

$ means following text is a shell (terminal) command. Copy the text after the ‘$sign.

Step 1: Create Daemon File

$ sudo cp /opt/local/var/macports/software/mysql5/5.0.67_0+server/opt/local/etc/LaunchDaemons/org.macports.mysql5/org.macports.mysql5.plist /System/Library/LaunchDaemons/

Skip to Step two if previous command worked.

Save the following text to /System/Library/LaunchDaemons/org.macports.mysql5.plist

$ sudo cat > /System/Library/LaunchDaemons/org.macports.mysql5.plist

Copy and following text in to terminal. All the way down to the line that says “## STOP COPYING”

$ cat <<END > /System/Library/LaunchDaemons/org.macports.mysql5.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>Label</key><string>org.macports.mysql5</string>
<key>ProgramArguments</key>
<array>
<string>/opt/local/bin/daemondo</string>
<string>–label=mysql5</string>
<string>–start-cmd</string>
<string>/opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper</string>
<string>start</string>
<string>;</string>
<string>–stop-cmd</string>
<string>/opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper</string>
<string>stop</string>
<string>;</string>
<string>–restart-cmd</string>
<string>/opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper</string>
<string>restart</string>
<string>;</string>
<string>–pid=none</string>
</array>
<key>Debug</key><false/>
<key>Disabled</key><true/>
<key>OnDemand</key><false/>
<key>RunAtLoad</key><false/>
</dict>
</plist>
END
## Stop Copying

Step 2: Start Server and Make it load at system startup

Start server and add to start up Demon

$ sudo launchctl load -w /System/Library/LaunchDaemons/org.macports.mysql5.plist

Step 3: Test MySQL Connection

$ mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.67 Source distribution
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql>

Thats all there is to it…


Download of the Week

September 17, 2008

Textmate
“The Missing Editor”

OS: Macintosh OSX
Application Type: Powerful Text Editor
Price: $57 per user license (30 day Trial)
Site: MacroMates.com

Great for Ruby or in my case Ruby on Rails code development. Downside is the price. Or ask your local pirate. Im still on the 30 day trial, awesome editor.


OSX Firefox 3: Restoring Favicons in Bookmark Toolbar

September 14, 2008

I installed Firefox 3, the other day on my new Macbook Pro, and to my horror I noticed the bookmark toolbar doesn’t display favicons next to the bookmark label. So after some Google searches I found a nice workaround to fix this cosmetic problem.

So if your OCD’ing on little features like this as I was here’s how to restore this functionality using some nifty extensions.

Before

Before

Step 1: Install Stylish Firefox Extension.

Stylish “is is to CSS what Greasemonkey is to JavaScript“. It allows you to create CSS stylesheets to change the look of a website or in this case the Browser.

Step 2: Load Mac bookmark toolbar favicons style in to Stylish.

Click the above link or go to http://userstyles.org/styles/5969 and click the button “Load into Stylish” then in the dialog the pops up Press “Save”. Now in the bookmark toolbar you should have favicons next to the bookmark names.

After

After


Enjoy!


New System!

November 25, 2007

I built a new system the other day. Huge upgrade from my previous set up.

ASUS M2 “Crosshair” Motherboard
AMD Athlon 64 x2 DualCore Processor 6000 AM2
eVGA Nvidia 8800 GTS (went for the budget model vs the GTX)
Corsair DDR2-800 Dual 1 gig (2gb total) Ram
Sound Blaster X-Fi XtremeGamer Fatal1ty Professional Series 7.1 Sound Card
Logitech G51 5.1 Surround Sound Speakers
Logitech G5 Gaming Mouse

I’m really liking the setup, it outperforms my old system by far. I’ll post benchmarks when I get around to it.

Picture of new System

Kevin


Recommended OSX Applications

August 22, 2007

These are some mac applications which I find useful.

  • Quicksilver – Extremely powerful application launcher
  • Transmission – Lightweight bittorent client which suppors multiple downloads, and very simple interface.
  • xPad – WYSIWYG Notepad which supports categories, spell checking, and many other features.
  • iGTD - Personal Organizer based on the concepts introduced in the book “Getting Things Done: The Art of Stress-Free Productivity” by David Allen.
  • NetNewsWire – Award winning RSS/Atom news aggregator. ($29.95 for Full version. Free “lite” version).
  • DesktopManager – Virtual desktop support, has features such as menubar pager, transition effects, and uses very little memory.
  • Deeper – “Deeper allows you to enable and disable the hidden functions of Finder, Dock, Dashboard, Exposé, Safari, Login window and many Apple’s applications.”
  • Dockables – Add executables for various system events. (Sleep, Screensaver, Shutdown, Reboot, etc)

Adventures with PGP

August 15, 2007

Over the weekend I read up on PGP (Pretty Good Privacy). It “is a computer program that provides cryptographic privacy and authentication” (Wikipedia).

Heres a colection of links which A helped me out, and I think it will help you out if you decide to start using PGP.

General Links:

GPG: The Best Free Crypto You Aren’t Using, Part I of II
GPG: The Best Free Crypto You Aren’t Using, Part II of II

Thunderbird Extensions:

Enigmail: Add-On which integrates GnuPG in to Thunderbird.
“Enigmail adds OpenPGP message encryption and authentication to your email client. It features automatic encryption, decryption and integrated key management functionality. Enigmail requires GnuPG (www.gnupg.org) for the cryptographic functions. Note: GnuPG is not part of the installation.”

Firefox Extensions:

FireGPG: Use GPG easily in Firefox
“FireGPG is a Firefox extension under GPL which brings an interface to encrypt, decrypt, sign or verify the signature of text in any web page using GnuPG.”

My PGP Public Key:

—–BEGIN PGP PUBLIC KEY BLOCK—–
Version: PGP Key Server 0.9.6

mQGiBEa+ObcRBADVTe1YpZBrStPGBf5ZzGgqcxguwq6ySKNbPHUuonmDcakewV8H
sm983kcM+wEMxySU8ID1pUBAdofO03qt3/e+cFUCtM80MO8LymIEwpXtrnnIe4ay
Yc0CgQVdgOTe9LCwST94Mqefo6DxbLn9FnenyfAF94Oj3JbfdlXm4AiyawCgmjI0
n8FxDUaexvqki3iB1CM1K9UD/3QdZ1Coc+/wgRBSOVAKDKMJax6nDSGAh4YM9Cpr
whHU4ws+SUA8b1lduKN7Wd+UC4SaOTDDsJBW3ceMTQV1M5nM2grgztcHSc7rbjEX
XE2FoSjRXzc6K2QXY09SooNqLtbBPI46kctGnbJuX0Tad9ixwGZTVd2sBbODECNo
WRxrA/9X3vD7N0kY3PEOD3wLuVGNuJ2IC5WL/b6FinVhSl5HeKmge7mja4Eo7I8C
+BL7M5q7xvnS8/+2sPqrZck9dE/h92HvZYwMrZ7pQLD80vDC4Z1L/NcT4x6aDw/b
R5O8sjIQsFUA8UhhMijTU134zQy2i+4WSvB68NcZia8hx6j/CrQiS2V2aW4gQ29y
dGV6IDxrdm5jb3J0ZXpAZ21haWwuY29tPohgBBMRAgAgBQJGvjm3AhsDBgsJCAcD
AgQVAggDBBYCAwECHgECF4AACgkQ2yf8gTm+cAsFkwCeIZyIF9dxu72U81nafhac
0u6sgXwAnjSu5S3SGzRK09ngeFH48A1oUKhnuQENBEa+ObcQBADUV/6+HbyqFLXO
ftmmtWdL+m7WMAAqHuQJwJo/Ht8PerbPcMdaXY2HeA7kEvxBOIJ3m/Oowoeo5xT7
l1Q70bb9IN4GDxFuO43AOrlJjJRvunWMisxaG0qvQQxx/JYg88FdHF7RqTWWmyBp
pfREp97eOaBWTcnAsVpzFCJZqaTs5wADBQQAwC4vKJzRkxMlrs+BwLin34d6poXa
PlN/kjYWwWbW/yko5oXbP5w2v3LKpsF3c/eFj4cbNSYDm9jqw1Qru4j+byvZUKSI
D3RDz1MaZoX6nZ1mklHxZ05RtaKrDckKPadsn8nORYYCH1mYitPdQwJyGIy3Cvy5
E/3/JlBYNpra9PSISQQYEQIACQUCRr45twIbDAAKCRDbJ/yBOb5wC5w3AJ4useoJ
gdcGa+0RIxR6/++YvGxeEwCfXTAYIn8Ui1DKqYZWKSK/xohRYCs=
=qv7v
—–END PGP PUBLIC KEY BLOCK—–

-Kevin


PAP2-NA Working with Gizmo!

August 15, 2007

PAP2-NAPicked up a Linksys PAP2-NA on ebay the other week, got the phone in the mail yesterday. Wasn’t expecting that I would have much luck but I was wrong. Very easy to set up with GizmoProject, http://gizmoproject.com a softphone based service, similar to skype.

The settings used to get PAP2 going with Gizmo were:
In admin view, under the tab Line 1 (or whatever line you decide to use)

Under “SIP” Tab

Stun Enable: yes
Stun Server: stun01.siphone.com

Under “Line 1″ Tab

Proxy: proxy01.sipphone.com
Outbound Proxy: proxy01.siphone.com
Display Name: [whatever you want to show up on caller id?)
User ID: [GizmoProject Username]
Password: [GizmoProject Password]
Dial Plan:
*xxT|*1xx|[39]11|<411:18315551212>S0|<:1831>[2-9]xxxxxxS0|1xxx[2-9]xxxxxx|[2-9]xxxxxxT|[2-9]xxxxxxxxx|011x.T
Save!

I got a regular phone plugged in to the PAP2 everything that is in a standard phone line is basically there. Caller ID Dispaly, Call Waiting, 3 Way Calling. On the other hand some differences which are kind of annoying. Instead of being routed to a ’411′ call center or any local 411 service you land up calling tellme. Which serves nothing similar to ’411′. I’m unsure of how ’911′ is handled, and hopefully they came up with some better solution than tellme. Other than that, call quality is equal to standard telephone line but a lot cheaper!

Kevin


Follow

Get every new post delivered to your Inbox.