Monday, November 12, 2012

Using TkDiff with Subversion on OSX

Step 1: Download and install TkDiff

Download this from SourceForge, unpack the disk image, and drag the tkdiff application to your Applications directory.

Step 2: Set up an alias to run TkDiff from the command line

In bash on my machine, I added the following to my PATH in my ~/.bash_profile so I could run it via the command line.
PATH="/Applications/TkDiff.app/Contents/MacOS/:${PATH}"

Step 3: Tell Subversion to use TkDiff instead of the default

You'll need an adapter script so Subversion can call TkDiff correctly.
#!/bin/sh
# Configure your favorite diff program here.
DIFF="tkdiff" 
# Subversion provides the paths we need as the sixth and seventh
# parameters.
LEFT=${6}
RIGHT=${7} 
# Call the diff command (change the following line to make sense for
# your merge program).
$DIFF $LEFT $RIGHT
Then add the following to ~/.subversion/config to default to this diff method.
diff-cmd = /Users/tgnourse/scripts/tkdiff-svn-wrapper.sh

Step 4: Success!

Now you can diff all your edits like so:
svn diff
In addition, TkDiff has built in subversion support so you can also diff single files like so:
tkdiff your/file.ext

Monday, September 28, 2009

Writing to / Reading from a Serial Port on Linux

echo -n "?" > /dev/ttyUSB0

 tail -f /dev/ttyUSB0

The beauty of this is that this can happen while something else is connected to the port which makes the tail command great for debugging.

Thursday, August 6, 2009

Getting a Blackberry Tour Unlocked on Sprint

This is a free service. All you need to do is be able to prove you own the account (i.e. remember your PIN number or secret question).

Step 1: Call the Sprint International Desk at (817) 698-4199 and select option 3 to get a real live person.

Step 2: Tell them your Sprint phone number (the one that goes to your Tour) and answer any verification questions.

Step 3:  They should now give you your unlock code. To unlock your phone all you need to do is.

  1. Options -> Advanced -> SIM Card
  2. Type 'mepdmep2' (a dialog should pop up)
  3. Enter your unlock code
  4. Reset your phone by pulling the battery
That's it! Kudos to Sprint for making this so easy, if a little hard to discover.

Monday, August 3, 2009

Tethering on Blackberry Tour (9360) on Sprint on Windows

  1. Pair the Blackberry and your computer (should be self explanatory)
  2. When setting up the connection enter "#777" for the phone number
  3. Leave the username and password blank
  4. Click "Dial" to start the connection
Note that despite the fact that this is listed as a "Dial Up Connection" its really just using the phone as a Bluetooth Modem like it should.

Thursday, July 30, 2009

Disabling the Voicemail Greeting for Sprint

1. Access your voicemail box.
2. Press 3, for personal options.
3. Press 2, for greetings.
4. Press 1, to change your personal greeting.
5. Press 3, to add or remove the caller instructions.
6. Follow the prompts to turn instructions on or off.

Thursday, March 13, 2008

Install MySQL5 + Python Support

sudo apt-get install mysql-client-5.0 mysql-server-5.0 python-mysqldb

Tuesday, December 11, 2007

Hauppauge ImpactVCB

I purchased this card intending to use it on my Ubuntu Linux box and it worked fine. All I had to do was make sure I set VLC and Motion to use NTSC .. silly Europeans set PAL to be the default.

Selecting an input is done by selecting the channel number.

Now, despite the fact that it has 4 inputs (1 super video and 4 analog) it can only capture from one of those inputs at a time :( I guess this is why it was $40 and everything else was $100 or more.

Thursday, December 6, 2007

% sudo apte-get ...
...
Media change: please insert the disc labeled
'Ubuntu 7.10 _Gutsy Gibbon_ - Release i386 (20071016)'
in the drive '/cdrom/' and press enter


This can be avoided by commenting out "deb cdrom: ..." in /etc/apt/sources.list.

Tuesday, November 20, 2007

Serial Port Names

http://tldp.org/HOWTO/Serial-HOWTO-4.html#ss4.3

Are things like /dev/ttys0.

Killing Motion or Reloading Config File

kill -s SIGHUP pid # Reloads the config file.
kill -s SIGTERM pid # Captures the last event and quits.

Installing Motion

First installed Apache / MySQL / PHP 5 (see previous post).

Next do the preparation.

% sudo apt-get install libc6 libc6-dev libglib1.2 libjpeg62 libjpeg62-dev zlib1g zlib1g-dev

http://www.lavrsen.dk/twiki/bin/view/Motion/MotionGuideInstallation#Preparation_For_Install

Note that Ubuntu packages will be the same as the Debian ones. So make sure they're all installed. Note that a bunch (especially the non dev packages) will already be installed.

Next follow the installation instructions here:

http://www.lavrsen.dk/twiki/bin/view/Motion/MotionGuideInstallation#How_do_I_install_Motion

Everything worked for me except the instructions lie about the placement of the default configuration file. The installation script doesn't lie, however, so use that location. The one I'm using ended up here:

/usr/local/etc/motion.conf

I made the modifications they suggested hooking it up to /dev/video1. And it worked like a charm. Plopped data down into /var/www/camera/ like I configured it to.

Installing VLC (w/ GUI) for Quickcam 4000

% sudo apt-get install vlc vlc-plugin-esd mozilla-plugin-vlc

Now run vlc

% vlc

File -> "Open Capture Device" and set "Video device name" to "/dev/video0". Hit "OK" and you should see the video from the webcam appear on screen. If you want the source data bigger go ahead and click "Advanced Options" and increase it to 352w x 288h.

Friday, October 26, 2007

Installing Apache2 + PHP5 + MySQL5 on Ubuntu

Apache2 + PHP5 + MySQL5:
sudo apt-get install apache2 php5 mysql-client-5.0 mysql-server-5.0 phpmyadmin libapache2-mod-php5 libapache2-mod-auth-mysql php5-mysql

Start Apache/MySQL this way (although they will be started automatically when installed):
sudo /etc/init.d/apache2 start
sudo /etc/init.d/mysql start

Default WWW Root is:
/var/www/...

Config File is @:
/etc/apache2/apache2.conf