SSH Tunneling to mysql server using Putty

mysql, ssh, Tricks, Tutorial
 I've had this question a couple of times in the past few months (since I posted the command line version of this method here ). To make it short and sweet, yes you can use Putty in a windows environment to setup ssh tunnels. Here is the specific scenario with pics for setting up a tunnel to your mysql server (assuming mysql server is running on a machine that you have ssh access to) using putty. This allows you to run mysql-gui-tools under windows and connect thru ssh to your server, without having to open the server to accept connections from the network.Download Putty full install package Run putty and your'll see the following screen. Fill in the hostname of the DB server and choose SSH as protocol.Go down to SSH and Tunnels options.…
Read More

FFmpeg commands for ipod video encoding…

CLI, ffmpeg, iPod, iPodTouch, Opensource
So I found out the hard way that the new ipod's (with video out) can actually play 640x480 video and also figured out how to get iTunes to accept the encoded files (so that I could sync them with the device).......here is the run down:"TV-Out" mode - 1.5Mbit/s 640×480 H.264 videosBIT_RATE <= 1500 kbps640×480Up to 30 fps“Low-Complexity” H.264 Baseline Profile1 reference frameUp to H.264 level 3640 pixels maximum frame widthSample Aspect Ratio (SAR) must be 1:1UUID atom must exist containing the following hex data: 6B 68 40 F2 5F 24 4F C5 BA 39 A5 1B CF 03 23 F3....This allows you to add the video into iTunes. You need AtomicParsley for this which can be checked out from their subversion repository . See below for usage.For 1-pass encoding use:ffmpeg -i INPUT…
Read More

ffmpeg command line quickies…..

CLI, ffmpeg, Opensource
Here are a bunch of ffmpeg command lines that will do just about everything you need.Getting info from a video fileffmpeg -i video.aviTurn a sequence of images into videoffmpeg -f image2 -i image%d.jpg video.mpgTurn a video into a sequence of imagesffmpeg -i video.mpg image%d.jpgEncode video for Ipod/IPhoneffmpeg -i source_video_file.avi -acodec aac -ab 128kb -vcodec mpeg4 -b 1200kb -mbd 2 -flags +4mv -trell 1 -aic 2 -cmp 2 -subcmp 2 -s 320x180 -title X output_file.mp4Encode video for PSPffmpeg -i source_video_file.avi -b 300 -s 320x240 -vcodec xvid -ab 32 -ar 24000 -acodec aac output_file.mp4ORffmpeg -i "OriginalFile.avi" -f psp -r 29.97 -b 768k -ar 24000 -ab 64k -s 320x240 "OutputFile.mp4"Extract audio from a video file and save it as mp3 formatffmpeg -i source_video_file.avi -vn -ar 44100 -ac 2 -ab 192 -f mp3 output_file.mp3Convert…
Read More

Speed up Mac OS X Mail application…..

Apple, CLI, Macintosh, OSX, Tricks
Does your OSX Mail app crawl when you start it. Well here is a quick tip to speed things up again. Just issue this command from a terminal window (make sure you're not running Mail app first).sqlite3 ~/Library/Mail/Envelope\ Index vacuum;You should notice a bit of a performance improvement the next time you start the Mail application. This only works for the OSX mail.app, not other mail applications.
Read More

Basic APT commands

CLI, Linux, Shell Script, Ubuntu
Okay, now for a bit of CLI goodness. Here is a quick list of basic apt commands.  Debian and most derivatives (Ubuntu) use these for package maintenance.#searchapt-cache search packagename#package infoapt-cache show packagename#cleansudo apt-get cleansudo apt-get autoclean #old packages#checkapt-get check#get source codeapt-get source packagename#get depapt-get build-dep packagename#update/install/remove/upgradesudo apt-get updatesudo apt-get install packagenamesudo apt-get remove packagenamesudo apt-get upgradesudo apt-get dist-upgrade
Read More

Eject your Mac’s CD tray from command line……

Apple, Macintosh, OSX, osx Server
Yeah I know what you're thinking.....who the heck would need that. Well since mac's don't have a physical CD eject button on the front plate (ie: eject is done by eject key), if you ever need to put a CD/DVD into a machine without keyboard (server machine and/or if you're using teleport to share a keyboard/mouse) you're in trouble. It turns out those Apple geniuses knew about this and gave you a way out.....just open up a terminal (or ssh to your server) and type the following command:drutil eject
Read More

FunctionFlip frees your mac’s function keys…..

Apple, Macintosh, OSX
When I bought my Macbook Pro the first thing I noticed was that the function keys didn't "function" like those on my Powerbook. With all the new expose and spaces functions, you had to decide if you wanted the old style keys (ie: press F5 to increase volume and press Fn-F5 to get whatever was assigned to F5) or the new style (ie: pressing F5 by itself gets you whatever action is assigned to F5 -- which btw is nothing -- but pressing Fn-F5 will increase the volume). Well FunctionFlip lets you have your cake and eat it too. It turns the Function keys into Hybrid keys. You dicide what the primary function is and what the Fn-Fx function (if any) is. Free and OSX only. Here is a quick…
Read More

Disruptive Tech: Canon 5D MKII to shake up the DCinema Scene….

Canon, DCinema, Disruptive Technology, RED EPIC
When Canon announced their new 5D MKII DSLR Camera everyone was wowed by the 21MP sensor and all the other new goodies. What everyone has missed/neglected is the fact that this little beauty has the potential to become the new RED Camera. You see, with it's 2K video output (1080P) in quicktime RAW format at 30 fps and superb low-light performance, Canon has created a dynamite hybrid camera for the photo jounalists (or anyone who doesn't want to spend 20-30K on a RED camera). Vincent Laforet has done a very in depth review of this camera's video capabilities on his blog (video is upcoming). To quote Vincent: It produces the best video in low light that I’ve ever seen - at 1080p. A top commercial film editor who who regularly edits RED camera footage…
Read More