Skip to content

Instantly share code, notes, and snippets.

@nfreader
nfreader / functions.php
Created February 6, 2012 18:14 — forked from johnmegahan/functions.php
Extended Walker class for use with the Twitter Bootstrap toolkit Dropdown menus in Wordpress
<?php
add_action( 'after_setup_theme', 'bootstrap_setup' );
if ( ! function_exists( 'bootstrap_setup' ) ):
function bootstrap_setup(){
add_action( 'init', 'register_menu' );
@nfreader
nfreader / sshput-function.sh
Created October 31, 2011 18:55 — forked from jfro/sshput-function.sh
modified someone's sshput command for uploading ssh public keys
sshput () {
RSAKEY="${HOME}/.ssh/id_rsa.pub"
DSAKEY="${HOME}/.ssh/id_dsa.pub"
if [ $# -eq 2 ]; then
KEY=$1
if [ ! -r $KEY ]
then
echo "'$KEY' does not exist or is not readable"
return 1
#!/bin/bash
DATE=$(date +%Y-%m-%d-%Hh%M);
if [ -e $1 ]; then
rm -f $1
EVENT="removed"
else
touch $1
EVENT="placed"
fi