More random CLI

Generate random password. dd if=/dev/random count=8 bs=1 | uuencode -m – Find executable files that are world-writable – for local privilege escalation exploits… find /usr -type f -perm -102 FLAC to MP3 conversion on MacOS. # darwin ports versions of mplayer and LAME if necessary sudo port install mplayer sudo port install lame # FLAC… Continue reading More random CLI

Published
Categorized as geek Tagged

Static IP addresses with Ubuntu 11.10 regression

Static IP addresses. Things have changed slightly, before (11.04 and earlier) you could have a static IP address AND the DNS entry from your DHCP. Now if you have a static interface in /etc/network/interfaces the /etc/resolve.conf file get clobbered by NetworkManager with no content (apart from comment). # Generated by NetworkManager This can be solved… Continue reading Static IP addresses with Ubuntu 11.10 regression

Embedding Video in Java

Task: Produce application with embedded video. Must support flash video or similar. Must work on older version of SunOS, Windows and Linux (needs pure java implementation really). Must be tight-integration, i.e. not just open a video in an external player. Discussions on stack overflow this this JMF Java media framework. Supports older formats, but no… Continue reading Embedding Video in Java

Published
Categorized as geek Tagged

Ubuntu 11.10 update – assorted fixes

Waiting for network configuration hang at startup. Caused by directories not being created in setup. sudo mkdir /run sudo mkdir /run/lock sudo mv /var/run/* /run sudo mv /var/lock/* /run/lock sudo rm -rf /var/run sudo rm -rf /var/lock sudo ln -s /run /var/run sudo ln -s /run/lock /var/lock Flashing backlight on Samsung NC10 netbook… More details… Continue reading Ubuntu 11.10 update – assorted fixes

Local YUM fun

If you’re installing redhat on a machine without Internet access you may wish to setup a local YUM repository for extra bits and pieces after the main install. Add the following to /etc/yum.repos.d/local.repo. If there are any other .repo files in /etc/yum.repos.d then comment out their contents. Make sure you don’t have spaces in your… Continue reading Local YUM fun

Published
Categorized as geek Tagged ,

Port forwarding using SSH

Say you have a load a kit on a private network behind a “bridge” PC and you want to be able to connect directly to machines on the private network from your main network, maybe remote debugging etc. SSH can be used to open up ports on the bridge PC which can let machines on… Continue reading Port forwarding using SSH

Published
Categorized as geek Tagged ,

Power of find

I’ve noticed a lot of people seem to struggle with the *NIX find command, which isn’t the most intuitive thing to use. Here are some examples. The general strategy is use one or more predicates such as -name for matching filename/filename case insensitive, -size for file size, -regex/-iregex etc. Many predicates implies AND, OR can… Continue reading Power of find

MySQL root password reset on debian/ubuntu – cut and paste

Based on these instructions. http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html. Just cut and paste the following into a terminal to reset MySQL root password to ‘newpass123’ # stop existing service sudo service mysql stop; # start without access control sudo mysqld –skip-grant-tables & # wait until started sleep 5; # reset password echo “UPDATE mysql.user SET password=PASSWORD(‘newpass123′) WHERE user=’root’;FLUSH PRIVILEGES;”… Continue reading MySQL root password reset on debian/ubuntu – cut and paste