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 / 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 &
@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 / 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 good.midget@gmail.com
# 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 / 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 / .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 / 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 / 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 / git-find-blob.sh
Created May 11, 2010 23:14
git-find-blob
#!/usr/bin/perl
use 5.008;
use strict;
use Memoize;
sub usage { die "usage: git-large-blob <size[b|k|m]> [<git-log arguments ...>]\n" }
@ARGV or usage();
my ( $max_size, $unit ) = ( shift =~ /^(\d+)([bkm]?)\z/ ) ? ( $1, $2 ) : usage();
@dermidgen
dermidgen / SWFObjectDNN.html
Created June 4, 2010 09:56
html/js for flash/swfobject embeds in DNN
<script type="text/javascript" src="/common/js/swfobject.js">
<script type="text/javascript">
swfobject.registerObject("flash", "9.0.0", "expressInstall.swf");
</script>
<!-- EXTRA MARKUP -->
<table border="0" cellspacing="0" cellpadding="0" width="940" align="center" height="400">
<tbody>
@dermidgen
dermidgen / findFields.as
Created February 4, 2011 21:47
Aggressively searches for TextFields, and attaches an event listener.
/**
* Note - you'll need:
* import flash.events.FocusEvent
*
* Also, try/catch is pretty expensive processing-wise. Avoid it.
* I threw it together that way so you can play with it and get some
* better reporting on what's going on without it bombing on you.
* Once you refine it to search without throwing any exceptions on
* missing properties or methods, kill the try/catch.