Snippets
For example if you know your wifi card is tricky to get working and later kernels just don’t work.
Discover the current latest kernel currently installed. Its the one with the biggest number.
$ dpkg -l | grep linux-image
Become root.
$ sudo su
Pin that package and the generics.
$ echo linux-image-2.6.32-38-generic hold | dpkg –set-selections;
$ echo linux-image-generic hold | [...]
We’ve just written this feature as it seems to be missing from core and contrib.
Basically the use case is you want to have a subtree menu underneath a category menu item that contains posts in that category.
Currently there is no configuration–ie: if you enable this plugin it will subtree any category menu item in any [...]
I’ve done this a couple of times now so it needs recording. Every now and then someone manages to sneak a load of spam into my mailqueue which does nasty things to my server. Its a matter of identifying the spam and deleting it from the queue. Sometimes I also create a firewall filter for [...]
Working with other developers on projects has often resulted in large manual merges of parallel work. At the beginning this is straightforward as there are a small number of files and a short history. Things change as projects progress and I’ve sometimes spent hours on small updates.
Here is a git recipe for merging in those [...]
We were trying to track our Magento installs in git. I’d noticed that our source project contained more files than the clone
diff -rq [source] [clone] | grep -v git
Turns out that Magento has a lot of empty directories around. Easy way to fix that
find . -type d -empty -exec touch {}/.gitignore \;
via stackoverflow.com
Using ffmpeg we can quickly composite stills into a movie.
ffmpeg -f image2 -r 25 -i ./%d.jpg -b 1000k outfile.mp4
Where
-f is the input format. Always image2 when we are sequencing.
-r is the frame rate. PAL video is 25fps.
-i are the input files. The %d means sequentially numeric. This inputs files ending in jpg
-b bitrate
and lastly the [...]
SFTP is all well and good. Rsync is better. But when you have thousands of small files it can really drag. This snippet uses tar to bundle the files together and bring them over as a lump.
ssh remotehost “( cd /somewhere ; tar cf – something ) ” | tar xf -
Via http://www.koopman.me/2008/11/tar-pipe-ssh/
This is an example of the Issuu PDF flash viewer. Â For a low cost House of Laudanum can provide your website with an advertisement free version in which to showcase your PDF’s.
Open publication – Free publishing – More viewer
So I’ve never had to create a boot job that didn’t suit the defaults but today I did. And it took ages to figure out the `right` way to do it. Mostly because I was not correctly removing the previous entry.
Refresher. Create a boot job with the defaults
$ sudo update-rc.d bloodbath defaults
Ok. It’s not clear [...]
You can quickly install matching packages using this method.
List the packages installed
dpkg -l | awk ‘{print $2}’ > installed-packages.txt
Use the list to install on the target machine
sudo apt-get install `cat installed_packages.txt`