Having Screen show all the open windows in the last line

October 20th, 2008

hardstatus alwayslastline
hardstatus string '%{= rW}%-Lw%{= wb}%54>%n%f*%t%{-}%+Lw%< %{= bW}%-=%h | %c:%s | %H %l%{-}'

ericboehs Uncategorized

Text Expander URL trimming and more

October 18th, 2008

I created a nice text exapnder snippet and I thought I’d share it.
do shell script "/opt/local/bin/wget -O- -q http://tr.im/api/trim_url.xml?url=$(pbpaste) | tr '>' '\n' | tr '<' '\n' | grep -m 1 -A 1 url | tail -1"

It grabs the clipboard contents, sents it to http://tr.im and then grabs the url. You just type your expander code and poof whatever was in the clipboard is now shrunk to a http://tr.im/url

I also made a few other ones that are pretty simple. This one types the current playing artist - track in iTunes:

do shell script("osascript -e 'tell application \"iTunes\" to artist of current track as string' | tr '\n' ' ' && echo \"-\" | tr '\n' ' ' && osascript -e 'tell application \"iTunes\" to name of current track as string'")

There’s probably an easier way to do it than calling an shell script to run an applescript from within a apple script but it was 4 am and I haven’t had time to change it.

Also, an uber simple uptime:
do shell script ("uptime | awk -F',' '{print $1 $2}'")

That’s all for now!

ericboehs code

How to rip CDs to ISOs on Mac OS X

August 26th, 2008

1. Insert CD/DVD source

2. Fire up a Terminal, you can then determine the device that is you CD/DVD drive using the following command:

$ drutil status
Vendor Product Rev
MATSHITA DVD-R UJ-835E GAND

Type: DVD-ROM Name: /dev/disk1
Cur Write: 8x DVD Sessions: 1
Max Write: 8x DVD Tracks: 1
Overwritable: 00:00:00 blocks: 0 / 0.00MB / 0.00MiB
Space Free: 00:00:00 blocks: 0 / 0.00MB / 0.00MiB
Space Used: 364:08:27 blocks: 1638627 / 3.36GB / 3.13GiB
Writability:
Book Type: DVD-ROM
3. Umount the disk with the following command:

$ diskutil unmountDisk /dev/disk1
Disk /dev/disk1 unmounted
4. Create the ISO file with the dd utility (may take some time):

$ dd if=/dev/disk1 of=file.iso bs=2048
5. Test the ISO image by mounting the new file (or open with Finder):

$ hdid file.iso
6. The ISO image can then be burnt to a blank CD/DVD.

ericboehs Uncategorized

How to start VNC remotely on a Mac OS X box

August 24th, 2008

I recently was trying to administer my mac from my in-laws house and I wanted to install an application that used Installer.app. So, I thought I’d create an SSH tunnel and and VNC in it. Unfortunatley, I didn’t have VNC configured. So it was off to the search engines. Here’s what I came up with:

Once you get SSH’d in you can change the VNC password and start the VNC service using the following command:

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -clientopts -setvnclegacy -vnclegacy yes -setvncpw -vncpw VNCPASSWORDHERE -restart -agent

So have fun remoting your box!  Btw to VNC over SSH just type something like: “ssh -L 5903:localhost:5900 example.com “.  You can then VNC to your local machine on port 5903 or “display” 3.
Edit: Hmm when I did this my VNC service’s cpu usage went through the roof.  Not sure if this will happen for everyone but just in case, restarting it fixed it:

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent

ericboehs Uncategorized

How I setup my iPhone

August 17th, 2008
  1. Jailbreak
  2. Connect to the local wifi (grab the IP while you’re here) and set the auto-lock to never (temporarily)
  3. Install ssh via Cydia and ssh to the IP we got a second ago as root
  4. passwd mobile && passwd
  5. apt-get update && apt-get -y upgrade
  6. apt-get -y install cydia-sources sqlite3 libxml2 sudo autossh com.bigboss.bossprefs curl com.thespicychicken.customize com.ericasadun.utilities com.bigboss.flashlight com.yourcompany.hpcalc irssi metasploit3 mobileterminal com.mxweas.mxtube netcat ngrep nmap com.qik.qik com.misurda.filedownload.plugin screen org.losprog.swaptunes tcpdump top unrar vim wget whois winterboard p7zip
  7. While that is going I make a new ssh session and cd /System/Library/PrivateFrameworks/MobileInstallation.framework/ && mv MobileInstallation MobileInstallation.bak
  8. Then, in a third tab, I scp ~/Software/iPhone/MobileInstallation root@192.168.1.5:/System/Library/PrivateFrameworks/MobileInstallation.framework/
  9. Now back in the 2nd tab I chmod 775 MobileInstallation
  10. I also like to setup my ssh keys for passwordless sshing, so (if you haven’t already ssh-keygen -t dsa) back in the third tab, I scp ~/.ssh/id_dsa.pub root@192.168.1.5:~/
  11. Next I go back to the 2nd tab and cd ~ && mkdir -p ~/.ssh && chmod 0700 ~/.ssh && touch ~/.ssh/authorized_keys && cat ~/id_dsa.pub >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys && rm ~/id_dsa.pub
  12. Now I wait for apt-get to finish, reboot the iPhone, and sync!
Voila! Done!  Not too hard huh?  Now I set some small details:
  1. Set the auto-lock to 1 minute
  2. Set the Fetch data to Hourly
  3. Turn bluetooth on (and pair it with my car)
  4. Turn keyboard clicks off (Under Sound)
  5. Set my Wallpaper to something cool
  6. Set a passcode and have it lock after 1 minute
  7. Make the home button open the iPod
  8. Turn on Caps Lock feature
  9. First I open mail, and then go back to settings to do the next few items.
  10. Go to my Mail account and go to advanced.  Change Draft and Trash to the correct Gmail IMAP folders
  11. Back to the mail settings: I remove the signature, and change the default calendar to “Home”.
  12. Off to the iPod: I replace Songs with Podcasts and then swap Podcasts and Playlists in order.
  13. I then go to my qik account at http://qik.com/ericboehs and choose reinstall qik from the left.  It’ll SMS an activation code that then allows me to just open Qik to automatically set everything up.
  14. I then like to install a theme such as Illuminous and activate it in Winterboard.
Oh and here are a list of third-party apps I install (free and non-free):
  1. Teleport
  2. To be continued…

ericboehs Uncategorized

Making Agile Messenger on the iPhone have no default personal message

July 4th, 2008

Well Agile Messenger came out for the iPhone about a week ago.  It has everything I want including the ability to stay signed in in sleep mode, Copy and Paste, send pictures from the camera, audible and vibration alerts that DON’T stop the iPod from playing it’s current track. There are a few features I’d like such as clickable links and maybe display pictures, and a “blah is typing a message” notification (both ways).  Also maybe better icons and sounds, but you can get those with a simple hack of the resources folder.  Lastly, an  notification icon of new messages in the status bar (by the battery) would be nice. So now the only really annoying thing is it always signs in with “Mobile with AgileMessenger.com” as my personal message.  Well I figured out how to turn that off, and you don’t have to “hack” it using the command line or anything.  You simply:

  1. Go to the Preferences and make sure Auto-connect is off (you can turn it back on when we’re done if you want)
  2. Exit and reopen Agile Messenger (don’t connect to anything though)
  3. At the services screen tap on the services  you want to connect to and choose “Personal Message” and “(-none-)”
  4. Now login to all the services you want to save this preferences for
  5. Exit and reopen Agile Messenger (You can reenable auto connect now)

That should be it.  You’ll now start those services with no default message.  You can do this with a customized message too if you’d like (instead of signing in with none).  Enjoy your new awesome iPhone chat client.

ericboehs Uncategorized

My first post with TextMate

March 14th, 2008

This is my first post from TextMate. I wonder how it will look. I bet it’s uber awesome and all my wildest fantasies will come true as soon as I post this. I can’t wait!

ericboehs Uncategorized

Epic comment is epic.

March 9th, 2008

Comment left on digg about aXXo returning:

I believe now would be an appropriate time for the Axxo’s Prayer…Please join me:

Our Ripper, who art on mininova,
aXXo be thy name.
Thy torrents come.
Seeding will be done,
Here as it was on suprnova.
Give us this day our latest rips.
And forgive us our leeching,
As we forgive those that leech from us.
And lead us not on to private trackers;
But deliver us from the MPAA:
For thine is the ripping, the seeding, and the glory,
For ever and ever.

Amen…

Note: This post contains nothing original. 

ericboehs Uncategorized

January 30th is International Delete Your MySpace Day

January 24th, 2008

PLease no more myspace. . . . We were just recently alerted here at Mashable that January 30th, just a few scant days away, is International Delete Your MySpace Account Day.

ericboehs Uncategorized

Flock is awesome

January 24th, 2008

Go download it, if it’s not awesome to you, you are obviously not a geek.

It always you to blog, tweet, facbook, flickr, bookmark to del.icio.us, and interface with youtube’s social network, all in a browser based off of Firefox.

Here’s a nice little extension for it to move your tabs around from window to window:
https://extensions.flock.com/node/60890

Tab To Window

Also, some firefox extensions work with it, I like these two:

  https://addons.mozilla.org/en-US/firefox/addon/1865 - Ad Block Plus -and-
https://addons.mozilla.org/en-US/firefox/addon/1320 - Gmail Manager AWESOME!

ericboehs Uncategorized