simple
Postgresql Backup Script – Quick and Simple
Root uses psql to list all databases and then looping through each one, root uses pg_dump as postgres piped into pbzip2 which is a parallel implementation of bzip. Any new databases will be picked up by the script each time it is run.
How to Create samba users and Verify they can connect
This is the simplest way I know to get samba up and running. This isn’t the most secure, best, smartest, etc. It’s just for testing and getting up and running as quickly as possible.
Printing variables in python with placeholders
Even if you’ve only dabbled with python for a minute or two, you’ve probably already figured out that you can print variables using placeholders. You might have tried concatenation too. However, did you know you can print using %s but with the variable names directly?
Bottle: Python Web Framework Made Simple
It doesn’t get much easier than this. However, you must add routes for static files such as style sheets and images. These are things that you may take for granted if you’re used to relying on standalone web servers.
The simplest NTP configuration for a home network
I was curious about using NTP to keep a few stand-alone machines synchronized. None of them have access to the outside world, or access to another host that has access to the outside world – they’re completely cut off. So how do you run a NTP server with no upstream time source? Easy!
Secure Delete shell script – Simple but complete
So I just wrote this in 2 minutes so I could kill some things in /etc and /home and be done with it. Short and simple, don’t you think?
Setup GRUB boot loader in 3 steps
GNU GRUB is easy to set up, it’s just got it’s own funky syntax that you don’t really see anywhere else.
===GRUB stands for GRand Unified Bootloader===
GNU GRUB is a multiboot boot loader derived from the original GRUB. It is the first software program that runs when a computer starts. It loads the kernel and … that’s it. It’s the kernel’s job to load the rest of the OS. GRUB was originally created by Erich Stefan Boleyn.
===Quick, easy, & painless===
Install grub. In gentoo i’ll just emerge it from the portage tree. You may have to download the source manually or perhaps use your package manager to install from a binary.
Build it and run it
====# emerge -a grub && grub====
|
1 2 3 4 |
These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] sys-boot/grub-0.97-r6 Would you like to merge these packages [Yes/No] y |
You should eventually find yourself at the grub prompt grub>. The hd syntax starts numbering from zero. If your drive is the 2nd device and you want to install grub on the 8th partition, you would use (hd1,7)
====grub> root (hd0,0)====
|
1 |
Filesystem type is ext2fs, partition type 0x83 |
====grub> setup (hd0)====
|
1 2 3 4 5 6 |
Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/e2fs_stage1_5" exists... yes Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded Done. |
Type quit to exit. You will need to customize the barebones menu.lst to boot whatever operating systems you want.