Random things I learnt today

clearfsimport can be used as non-root user when used with the misleadingly named option –nsetevent Awk is useful for filtering specific line numbers from files. # all but first line awk “NR>1” foo.txt # everything but line 3 awk “NR!=3” foo.txt # lines 3 to 7 inclusive awk “NR>=3&&NR

Published
Categorized as geek Tagged

Converting mythtv mpg files

In order to use TV programs recorded by mythtv with a video editor such as Final Cut Pro some conversion needs to be done. The first step is to fix the video using mythtranscode. Raw mpeg TS files recorded by mythtv will only play with mplayer/VLC but crash most other programs mythtranscode –mpeg2 –infile input.mpg… Continue reading Converting mythtv mpg files

TTY sudo fun

requiretty is an option in /etc/sudoers which prevents sudo operations from non-TTY sesssions. # This will be disallowed ssh example.com echo “hello world” sudo: sorry, you must have a tty to run sudo # This will work ssh -t example.com echo “hello world” hello world If however you’re using SSH via a wrapper you cannot… Continue reading TTY sudo fun

Open sourcing lego printer

I’m getting plenty of hassle on youtube currently to provide source code and instructions for my lego printer. This is my first public source code release so I want to do a “proper-job”. Started looking into licenses but already stuck. The wikipedia list of software licenses is fairly bewildering as is the list on the… Continue reading Open sourcing lego printer

Mounting filesystems over SSH

If you’re using a web host that supports SSH login, then you can mount the filesystem over SSH with Linux. # install the package (debian/ubuntu) sudo apt-get install sshfs # Create a mount point in current directory mkdir example.com # Mount the remote directory “/home/user/example.com” sshfs user@example.com:/home/user/example.com example.com Or on a mac… by downloading MacFUSE… Continue reading Mounting filesystems over SSH

ToolTips not shown over JWindows

Tooltips not shown on components placed in JWindows. The fix/workaround is the following line somewhere in your application startup. UIManager.getDefaults().put(“ToolTipManager.enableToolTipMode”, “”); ToolTipManager only requires keyboard focus to show tooltips when the property ToolTipManager.enableToolTipMode is set to “activeApplication”. JWindow widgets do not appear to get keyboard focus in the same way top level JFrames do. References… Continue reading ToolTips not shown over JWindows

Published
Categorized as geek Tagged ,

xmltv manip timezone fail [solved]

Fail When trying to use xmltv with mythtv, specifically tv_grab_uk_rt, with Ubuntu 10.4 the following error is seen. XMLTV requires a Date::Manip timezone of +0000 to work properly. Current Date::Manip timezone is 1. Fix Use the latest version and dependencies from debian. This is prob. simplest, although same result can be achieved with messing with… Continue reading xmltv manip timezone fail [solved]