‘bash’ A.K.A. The Solution for Everything – Passed Variables & The Script Filename

When writing a script in bash you can pass parameters into that script to work with. For example, let’s say … More

‘bash’ A.K.A. The Solution for Everything – A few of the *Special Files*!

In bash, the shell reads one or more startup files. Here’s the details about what’s what and which is run … More

New Trio of Series: Go, Bash, and Distributed Databases

I’m starting three new series and only making this post now that I’ve got the first round posted and live. … More

Documentation First w/ README.md && Project Tree Build

I’m sitting here trying to get the folder structure for my project into a kind of ASCII Tree or something. … More

One OS-X Tip and One MySQL Dev Tip

I’ve downloaded and installed MySQL recently. I was doing a few things to make it easier to work with and thought, “I ought to document this, it isn’t real intuitive without pages of documentation being read.” So here’s some tips.

1. Make sure you can view all of your files in OS-X, especially if you intend to do development. What I’ve found to be the easiest way to do this, is to setup a script application on the desktop. Open up the AppleScript Editor, quickest way is to press the ⌘ + Space Bar and type in applescript and hit enter. In the editor enter the following code:

[sourcecode language=”bash”]
set dotVisible to do shell script “defaults read com.apple.Finder AppleShowAllFiles”
if dotVisible = “0” then
do shell script “defaults write com.apple.Finder AppleShowAllFiles 1”
do shell script “defaults write com.apple.Finder AppleShowAllFiles 0”
end if
tell application “Finder” to quit
delay 1
tell application “Finder” to activate
Then save the file with the following options in the save as dialog selected.

AppleScript Editor Save As Dialog w/ Appropriate Settings
The only thing you really need to set is the File Format to “Application” and be sure nothing is checked. Now whenever you double click the file on the desktop, the finder will automatically be restarted with all the files visible, and double clicking again will hide all of the files from view.

2. Setup MySQL and when done, make sure to add the appropriate aliases to the .bash_rc file for the bash shell. These include setting these two aliases:

[sourcecode language=”bash”]
alias mysql=/usr/local/mysql/bin/mysql
alias mysqladmin=/usr/local/mysql/bin/mysqladmin
That’s it for now, more tidbits to come and a write up of my extended weekend PDX hacking sessions with Geoloqi.