Keychain Access from a Shell.sh Script

Jan 17, 2007

Here’s a useful snippet to enable you to securely store passwords in OS X’s keychain and use them in a shell script. #!/bin/bash PASSWORD=\`exec osascript <<EOF | tr "\\r" "\\n" (\* To use the Keychain to store the admin password then Open /Applications/Utilities/Keychain Access.app Add a new keychain called "TM" Add a Key with the name "test" and store your password in it. I'd recommend learning how keychains work then tailoring the process to your security needs. …

That Dictionary File,

Jan 11, 2007

The one i’m always forgetting where it hides, with the 234,936 english words in, is here /usr/share/dict/web2 as the readme says “it makes a dandy ‘grep’ vicitim”. …

Change "Welcome to Darwin!"

Jan 11, 2007

Here’s how to change the “Welcome to Darwin!” message when you open a new terminal. Simply open: /etc/motd and change the contents to whatever you like. I favour “Welcome to Hell!” …

Switching flash players on OS X

Jan 8, 2006

I wrote the following shell script a while back for use with TextMate as part of my build process. TextMate’s great as it easily allows you to bind scripts to custom commands (and key combinations). However you’d easily be able to adapt it to your set up. It will allow you to cleanly change all the flash players available for OS X, as well as being able to Uninstall the player, and optionally restart open browsers (FireFox and Safari) afterwards. …

Install and run SVN on OS X

Dec 18, 2005

SVN useage and installation notes for OS X (only tested with Tiger). You may need to have Developer Tools installed, or may prefer the convienience of DarwinPorts or Fink. Download and install, Subversion svnX (if you’d like a GUI). 1. Once subversion is installed open a terminal and navigate to a directory in which you’d like to create a repository. cd ~/Documents/Repositories/ 1b. Export the path to subversion for your shell. …

Linkages

Dec 18, 2005

A collection of odd linkings. funkuncle project-euh flash 3d lab my del.ici.ous perl python ruby ruby on rails php lua

Recursively remove .svn files

Dec 16, 2005

Here’s a quick shell script to recursively remove all the the .svn files starting in the current directory and working down. find . -type f -name "*.svn" -exec rm '{}' \; -print Change .svn to look for different types. Comments: Mike - Sep 5, 2007This creates a “Run Shell Script” that never goes away in my title bar… Are you sure this is doesn’t end up looping? Simon - Dec 2, 2007Mike - not sure how you’ve run the script but it’s always been fine for me. …

By eck.

Dec 13, 2005

Suprise. Suprise. I completely forgot about setting this up… It’s bound to go in fits and starts. The plan is to start posting techy tips and tricks I come across in an effort to collect them in once place. They’ll be covering flash, os x, terminal etc. Ohh and to try and build a collection of inspiring sites I find. Let’s see if I mange that…

Shell to Clipboard

Dec 13, 2005

I figured it’d be nice to be able to print output from the terminal/shell to OS X’s general clipboard. So after a little digging I found these two commands: pbcopy - copy to the clipboard. pbpaste - paste from the clipboard. Piping output should come in handy, ie: pwd | pbcopy will print the full path of the current directory directly to the cliboard. Or : ls | pbcopy for a list on the contents of the current directory. …

hell-o-blog

May 22, 2005

Things start somewhere. And here I am starting 10 minutes before I’m due at the cinema…