Post thumbnail of Two ways to change case lowercase to uppercase using sed
22 June 2010
Continue reading Two ways to change case lowercase to uppercase using sed

Two ways to change case lowercase to uppercase using sed

Change lowercase to uppercase or vice versa using sed the brute force easy way and the smart way. One use of this would be finding the hardware address of an interface and converting it to all uppercase.

Post thumbnail of qemu-ifup and qemu-ifdown network configuration scripts
8 April 2010
Continue reading qemu-ifup and qemu-ifdown network configuration scripts

qemu-ifup and qemu-ifdown network configuration scripts

These two scripts are called when you start a qemu or kvm virtual machine. I removed the openvpn –mktun and –rmtun commands because qemu handles it for you.

Post thumbnail of SVN pre-revprop-change hook scripts for Linux and Windows
8 January 2010
Continue reading SVN pre-revprop-change hook scripts for Linux and Windows

SVN pre-revprop-change hook scripts for Linux and Windows

For Linux it’s a simple shell script, nothing fancy is needed. If the script ends with a 0 exit value, the commit will work, if it exits non-zero, the commit will fail. In Windows the syntax is different because you don’t have a real shell. Instead, you use batch file commands to accomplish the same thing. The logic is pretty much the same because it’s simple.

Post thumbnail of Build script to utilize Makefiles to build multiple applications
29 December 2009
Continue reading Build script to utilize Makefiles to build multiple applications

Build script to utilize Makefiles to build multiple applications

You have a bunch of related applications, each has their own Makefile that knows only about their own application, but you have dependencies where one app needs to be built before another. Here’s a skeleton bash script for building any one thing or everything.

#!/bin/bash

function build {
echo "*** …

Post thumbnail of Brute force openldap backup script
4 November 2009
Continue reading Brute force openldap backup script

Brute force openldap backup script

Reliable, effective, and simple. If you don’t mind a blip in ldap service for a minute or two in the wee hours of the night, it works like a charm.

Post thumbnail of Instakill SSH sessions to mess with ssh-happy users on your box
14 August 2009
Continue reading Instakill SSH sessions to mess with ssh-happy users on your box

Instakill SSH sessions to mess with ssh-happy users on your box

Want to have some fun with users that keep ssh’ing to your box? Let them in, then kill them right away. I don’t even remember when/why I wrote this silly script, but here it is. There’s a lot better ways you could do this, and if you want any real ssh security, don’t even let them log in at all.

Post thumbnail of Secure Delete shell script - Simple but complete
9 July 2009
Continue reading Secure Delete shell script - Simple but complete

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?

Share this:
  • Digg
  • Facebook
  • Reddit
  • LinkedIn
  • Google Bookmarks
Powered by Wordpress   |   Lunated designed by ZenVerse