code snippets

JS tips

A collection of general purpose JavaScript tips, not related to any browser or any Document Object Model, at Google Code.

debian goodness

How to check for installed packages in Debian or Ubuntu?

The command we need to use is dpkg –get-selections, which provides a list of all the currently installed packages.

JS font change

The Document Text Resizer adds the ability for your users to toggle your webpage's font size, with persistent cookies then used to remember the setting.

recursive

Find a string in files recursively, using this command :

find . -type f -exec grep "string to find" {} \; -print

shell-fu, part one

How to pull an entire directory tree from a remote machine into your current directory:


ssh USER@SOURCEHOST tar cf - -C SOURCEDIR . | tar xvf -

For example, let's say you have a "bsmith" account on a host called "apple". You want to copy those files into your "bobsmith" account on a host called "pear". You'd log into your "bobsmith@pear" account and type the following:

ssh bsmith@apple tar cf - -C /home/bsmith . | tar xvf -

More at shell-fu.

Syndicate content