Skip to content

Instantly share code, notes, and snippets.

View dermidgen's full-sized avatar
:shipit:
Moving units

Danny Graham dermidgen

:shipit:
Moving units
View GitHub Profile
@dermidgen
dermidgen / netcat-proxy-command
Created May 5, 2010 11:22
netcat-proxy-command
#!/bin/sh
################
# Copyright Brian Hatch, 2004
# http://www.hackinglinuxexposed.com/articles/20040830.html
################
bouncehost=$1
target=$2
@dermidgen
dermidgen / firewall.sh
Created April 18, 2010 05:14
Firewall routing script for DD-WRT
#!/bin/sh
# vlan1 is our PRIMARY WAN connection (public IP)
# AUX WAN
WAN2_IFNAME=vlan2
WAN2_IPADDR=192.168.100.173
WAN2_GATEWAY=192.168.100.254
WAN2_NETMASK=255.255.255.0
if [ "$(nvram get wan2_ipaddr)" != "$WAN2_IPADDR" ]; then
@dermidgen
dermidgen / .bashrc
Created April 10, 2010 00:44
.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=ignoredups
# ... and ignore same sucessive entries.
@dermidgen
dermidgen / git-delete-history.sh
Created February 19, 2010 06:27
Git Delete History
#!/bin/bash
set -o errexit
# Author: David Underhill
# Script to permanently delete files/folders from your git repository. To use
# it, cd to your repository's root and then run the script with a list of paths
# you want to delete, e.g., git-delete-history path1 path2
if [ $# -eq 0 ]; then
exit 0are still
@dermidgen
dermidgen / gitconfig.sh
Created January 12, 2010 14:57 — forked from tjh/gist:275182
Git Config
git config --global user.name "Danny Graham"
git config --global user.email [email protected]
# Deprecated in favor of ...
#git config --global color.diff always
#git config --global color.status always
#git config --global color.branch always
git config --global color.ui auto
git config --global color.interactive auto
@dermidgen
dermidgen / apache_ssl_cert
Created January 12, 2010 14:37 — forked from rwoeber/create_self_signed_certificate.sh
Create SSL Certs and SSL Configs for Apache
#!/bin/sh
# Creates self-signed SSL certs
# Creates Apache vhost config
#
# Targets Ubuntu/Debian based distros
# Forked from http://gist.github.com/275207
# !!! Important !!!
@dermidgen
dermidgen / AptanaStudio2_UbuntuKarmic.sh
Created January 12, 2010 14:31
AptanaStudio2_UbuntuKarmic.sh
#!/bin/sh
cd ~/Apps/Aptana\ Studio\ 2.0/
export GDK_NATIVE_WINDOWS=true
./AptanaStudio &