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 / desktop-setup.sh
Created February 1, 2017 00:44
Desktop setup
#!/bin/sh
UPTRACK_KEY=
## First Update
sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove
sudo apt-get install -y -f \
zsh \
git gitk \
@dermidgen
dermidgen / sama5d4-xplained-ultra.sh
Last active December 7, 2016 06:23
Quick flash latest linux4sam-poky-sama5d4_xplained via sam-ba 2.16
#!/bin/bash
##
# Helper functions
##
pkg_check ()
{
echo "Checking for $1:"
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' $1|grep "install ok installed")

Keybase proof

I hereby claim:

  • I am dermidgen on github.
  • I am dermidgen (https://keybase.io/dermidgen) on keybase.
  • I have a public key whose fingerprint is 43D8 5C25 5698 A80F 8A3D 516B E006 2AEF 3888 D7AD

To claim this, I am signing this object:

var MapSymbol = function() {
var canvas = document.createElement("canvas");
var context = canvas.getContext("2d");
canvas.width = width;
canvas.height = height;
context.clearRect(0,0,width,height);
context.save();
context.beginPath();
@dermidgen
dermidgen / vmsterm
Created July 2, 2014 00:17
VMS Terminal
#!/bin/sh
# vmsterm
# from an original script by Bob Ess
# key translations by Erik Ahlefeldt
#
# Script file using Xterm and telnet to connect to a VMS host
# and give a decent vt220 emulation.
#
# Usage statement
Usage(){
@dermidgen
dermidgen / srsly.zsh-theme
Created June 3, 2014 16:11
Srsly ZSH Theme
PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%m %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}$ '
RPROMPT='%{$reset_color%} %{$fg_bold[green]%}%p %{$fg[grey]%}%~%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}) %{$fg[green]%}✓%{$reset_color%}"
@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.
@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 / 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 / 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