Skip to content

Instantly share code, notes, and snippets.

View homelinen's full-sized avatar

Calum Gilchrist homelinen

View GitHub Profile
@martiell
martiell / plugins.py
Created November 19, 2018 17:07
Find transitive dependencies of a set of Jenkins plugins using update centre metadata
#!/usr/bin/env python3
# Finds the transitive closure of dependencies for a set of jenkins plugins.
# The jenkins puppet module does not resolve transitive dependencies, so all
# the transitive dependencies need to be listed in the yaml of plugins to
# install.
#
# This script reads JSON from the update centre for the relevant version of
# Jenkins. For Jenkins 2.60, run the following before this script:
# curl -sLO http://updates.jenkins-ci.org/2.60/update-center.actual.json
#
@haasn
haasn / about:config.md
Last active December 27, 2024 15:46
Firefox bullshit removal via about:config

Firefox bullshit removal

Updated: Just use qutebrowser (and disable javascript). The web is done for.

@godwhoa
godwhoa / flip.py
Created March 7, 2015 05:52
table flip kill linux
#!/usr/bin/python
# -*- coding: utf-8 -*-
import upsidedown
import sys
import os
updown = upsidedown.transform(sys.argv[1])
print u"(ノಠ益ಠ)ノ彡 "+updown
os.system("pkill "+sys.argv[1])
@wvengen
wvengen / extend.sh
Last active April 22, 2024 14:02
Extend non-HiDPI external display above HiDPI internal display
#!/bin/sh
# extend non-HiDPI external display on DP* above HiDPI internal display eDP*
# see also https://wiki.archlinux.org/index.php/HiDPI
# you may run into https://bugs.freedesktop.org/show_bug.cgi?id=39949
# https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/883319
EXT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^eDP | head -n 1`
INT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^DP | head -n 1`
ext_w=`xrandr | sed 's/^'"${EXT}"' [^0-9]* \([0-9]\+\)x.*$/\1/p;d'`
@ralph-tice
ralph-tice / multi-terminals.sh
Created October 22, 2014 01:11
Open an iTerm to every instance in an AutoScaling Group using aws-cli, knife and jq
launch_terms () {
until [ -z "$1" ] # Until uses up arguments passed...
do
/usr/bin/osascript <<-EOF
tell application "iTerm"
make new terminal
tell the current terminal
activate current session
launch session "Default Session"
tell the last session
@aughban
aughban / gist:5917474
Last active December 19, 2015 07:19
pre-commit for git to check json files syntax are correct.
#!/bin/bash
if git-rev-parse --verify HEAD >/dev/null 2>&1; then
against=HEAD
else
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
exec 1>&2
@maxmanders
maxmanders / Vagrantfile
Last active December 8, 2016 14:12
Vagrant 1.1 with host-only and bridged networking
Vagrant.configure("2") do |config|
ip_address = "192.168.56.1"
config.vm.box = "ubuntu-12.04.2-server-amd64"
config.vm.hostname = "chef-server.local"
config.ssh.timeout = 30
config.vm.provider :virtualbox do |vbox|
vbox.customize [ "modifyvm", :id, "--memory", 1024 ]
@joshdick
joshdick / pipes.sh
Created December 9, 2012 18:54 — forked from anonymous/pipes.sh
pipes.sh
#!/bin/bash
declare -i f=75 s=13 r=2000 t=0 c=1 n=0 l=0
declare -ir w=$(tput cols) h=$(tput lines)
declare -i x=$((w/2)) y=$((h/2))
declare -ar v=( [00]="\x83" [01]="\x8f" [03]="\x93"
[10]="\x9b" [11]="\x81" [12]="\x93"
[21]="\x97" [22]="\x83" [23]="\x9b"
[30]="\x97" [32]="\x8f" [33]="\x81" )
@mrtazz
mrtazz / irssi_osx_dock.markdown
Created July 4, 2012 22:08
Shortcut for OSX dock to run irssi in tmux with iTerm2

Shortcut for OSX dock to run irssi in tmux with iTerm2

Synopsis

I run irssi inside a tmux session on OSX. I often close the terminal as I usually get notified by growl about important stuff. I don't want to open a terminal and write a command every time I want to check IRC.

The solution

1. Create a shell script with the following content

#!/bin/zsh
/usr/local/bin/tmux attach -d -t irssi || /usr/local/bin/tmux new -s irssi irssi
@remi
remi / .gitconfig
Created March 20, 2012 19:20
Find the most used verbs in your Git commit messages
[alias]
verbs = !git log --pretty=format:'%s' | cut -d \" \" -f 1 | sort | uniq -c | sort -nr