Skip to content

Instantly share code, notes, and snippets.

View kkumler's full-sized avatar
Verified

Kris Kumler kkumler

Verified
View GitHub Profile
@kkumler
kkumler / .gitconfig
Last active August 29, 2015 14:00
Bash git aliases (pared down)
[alias]
# Mostly: ff, unstage, hanging
co = checkout
ff = merge --ff-only
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
cat = cat-file -p
# Show changes just fetched
lc = log ORIG_HEAD.. --stat --no-merges
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
graphviz = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; echo '}'; }; f"
#!/bin/bash
#
# Notify of Homebrew updates via Notification Center on Mac OS X
#
# Author: Chris Streeter http://www.chrisstreeter.com
# KLK: Fixed package lists and do not show notification when there are no updates
#
# Requires: terminal-notifier. Install with:
# brew install terminal-notifier
@kkumler
kkumler / s3.sh
Last active August 29, 2015 14:20 — forked from chrismdp/s3.sh
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@kkumler
kkumler / iam-assume-role.sh
Last active September 24, 2015 20:30 — forked from ambakshi/iam-assume-role.sh
Assume an IAM role. An interesting way of doing IAM roles is to give the instance permissions to assume another role, but no actual permissions by default. I got this idea while setting up security monkey: http://securitymonkey.readthedocs.org/en/latest/quickstart1.html#setup-iam-roles.
#!/bin/bash
#
# Assume the given role, and print out a set of environment variables
# for use with aws cli.
#
# To use:
#
# $ eval $(./iam-assume-role.sh)
#
/*
Flash Blocker Detector
v0.1 of 2010-03-12
This script detects whether popular Flash blocking extensions are installed
and active on the current page. It is highly sensitive to the inner workings
of the extensions themselves, and it can only detect the current version
(at time of writing) of the following extensions:
* FlashBlock for Chromium / Google Chrome (#1)
@kkumler
kkumler / post-checkout
Last active December 11, 2015 23:19
git post-checkout hook to stop spring when checking out a new branch.
#!/bin/bash
PREV_HEAD=$1
NEW_HEAD=$2
BRANCH_CHECKOUT=$3
if [[ $BRANCH_CHECKOUT == 1 ]]; then
# Show when it's been stopped, but not that it's already stopped.
bin/spring stop | grep --color=never stopped
fi
default Ubuntu
label Ubuntu
kernel <%= @kernel %>
append initrd=<%= @initrd %> video=vga16fb:off vga16fb.modeset=0 interface=eth0 url=<%= foreman_url("provision")%> ramdisk_size=10800 root=/dev/rd/0 rw auto=true priority=critical hostname=unassigned-hostname DEBCONF_DEBUG=5 language=en locale=en_IE.UTF-8 console-setup/ask_detect=false keyboard-configuration/layoutcode=de console-keymaps-at/keymap=de-latin1-nodeadkeys keyboard-configuration/xkb-keymap=de debian-installer/country=AT debian-installer/fb=false BOOTIF=<%= mac %>
d-i debian-installer/language string en
d-i debian-installer/country string AT
d-i debian-installer/locale string en_IE.UTF-8
d-i localechooser/supported-locales en_US.UTF-8, en_IE.UTF-8
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/xkb-keymap string de
d-i keyboard-configuration/layoutcode string de
d-i keyboard-configuration/modelcode string pc105
d-i console-keymaps-at/keymap string de-latin1-nodeadkeys
@kkumler
kkumler / Resources.md
Created April 25, 2013 23:13 — forked from klamping/Resources.md
JavaScript testing resources, from @klamping's workshop.
@kkumler
kkumler / .config_git_attributes
Created December 8, 2017 20:40
Simple dicom git diff
*.dcm diff=dcmdump