Archive for the ‘mac os x’ Category

Updating Your Twitter Status with cURL and a Bash Function

Posted 07 Dec 2009 — by admin
Category Linux, mac os x

I’m usually at the command line so I wrote a little a bash function so that i can type

tweet this is really neat but kind of pointless

and it will update my twitter status! some characters trip it up but in general it’s useful for most of my tweets. The tweet function just spits out the arguments passed to it for the status parameter for the API call to twitter.

Add the following to the .bash_profile file and reload the terminal (don’t forget to add your email and pwd where appropriate).

tweet() {
   curl -u your_twitter_email_addr:your_twitter_passwd -d status="$*" http://twitter.com/statuses/update.xml
 }
 

*** Twitter still uses http basic authentication for their API. However, they are moving away from it in favor of oAuth. So I’m not sure how long this fun will last :{

Disk Usage Information on Mac OS X

Posted 04 Nov 2009 — by admin
Category mac os x

Get disk usage information about the Desktop

$ du -h -d 0 Desktop
14G	Desktop

Information about how much free space is available on computer

$ df -lh
Filesystem     Size   Used  Avail Capacity  Mounted on
/dev/disk0s2  111Gi  109Gi  2.3Gi    98%    /

You can read more about the flags with the man pages

$ man du
$ man df

This is my 100th post!!!