Skip to main content

Posts

Showing posts from June 17, 2007

Using Handbrake on the command line to convert video for the iPod

I downloaded HandBrake to my Ubuntu box, Shubuntu, and converted VOB files to MP4: ~/bin/HandBrakeCLI -i /media/MyBook500-ext3_/neil/media/DVDs/ -o /media/MyBook500-ext3_/neil/media/ipod/movie.mp4 -B 160 -R 48 -E AAC -e x264b30 -f MP4 -m -b 1500 -x frameref=1:bframes=0:nofast_pskip:subq=6:partitions=p8x8,p8x4,p4x8,i4x4:qcomp=0:me=umh:nodct_decimate Unfortunately, iTunes refused to transfer the result to my iPod: wrong format.

Strip bash comments with grep

Sometimes, you just want to see the code ... Let's say you want to look at a bash script, but strip out all the comments. Here's a sample command using grep that will display a bash script, without comments, to stout: grep -v "^#" commented-script.sh Notes: "-v" means invert the selection; i.e., only display the lines in the file that don't match. "^#" is the regular expression that matches "lines that start with #". "^" means only match the beginning of the line. Replace "commented-script.sh" with the file name of the file you want to strip. Tips: This command strips single line comments from any programming language. Just change the comment line character (";" instead of "#" for example). If you just want to read the comments, drop the "-v" switch.

Bash Shell Keyboard Shortcuts For Linux Users

Since the keyboard commands for bash are the same no matter what platform you run your bsh shell on (Mac, Windows, Linux, etc.) it pays to learn a few choice command. Here's a great reference: The default shell on most Linux operating systems is called Bash. There are a couple of important hotkeys that you should get familiar with if you plan to spend a lot of time at the command line. These shortcuts will save you a ton of time if you learn them. Here is the List of Bash Shell Keyboard Shortcuts For Linux Users Ctrl + A - Go to the beginning of the line you are currently typing on Ctrl + E - Go to the end of the line you are currently typing on Ctrl + L - Clears the Screen, similar to the clear command Ctrl + U - Clears the line before the cursor position. If you are at the end of the line, clears the entire line. Ctrl + H - Same as backspace Ctrl + R - Let’s you search through previously used commands more , including Alt keys ... Read the rest of the listing at Bash Shell Keyboa...

Freemind 0.8.0 - Java Mind Map software

FreeMind is mind-mapping software written in Java. I use it to plan web sites, promotions, business plans. It’s great for brainstorming, capturing your ideas and organizing them. Since it’s a cross platform Java application, it will run on Windows, Macs and Linux computers, among others. All you need is the current Java Runtime Environment, which is probably already installed if your computer is up-to-date. I use it on the Mac, and I’ve created a SmartFolder to find my FreeMind (*.mm) files quickly. I’ve tested sharing files with Linux, and it works like a champ, although some of the keyboard shortcuts are a little different across platforms. You can (and will) use your mouse, though -- drag-and-drop, collapse and expand (with a double click) let you zip around your mind maps and focus on the details you want, or zoom out to see the big picture. Import/Export & Sharing FreeMind uses an XML file format, meaning that you can read it with a text editor (Text Edit, Notepad, etc....