Skip to content

Instantly share code, notes, and snippets.

@inz
inz / emojis.md
Last active March 25, 2017 18:46
GitHub Emojis
@inz
inz / bold_title_plain.bst
Last active September 4, 2018 11:06
Plain BibTeX style but with bold titles.
% Based on BibTeX standard bibliography style `plain'. But with bold titles.
% Version 0.99b (8-Dec-10 release) for BibTeX versions 0.99a or later.
% Copyright (C) 1984, 1985, 1988, 2010 Howard Trickey and Oren Patashnik.
% Unlimited copying and redistribution of this file are permitted as long as
% it is unmodified. Modifications (and redistribution of modified versions)
% are also permitted, but only if the resulting file is renamed to something
% besides btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
% This restriction helps ensure that all standard styles are identical.
% The file btxbst.doc has the documentation for this style.
@inz
inz / wercker_rc.sh
Last active March 3, 2017 08:17
Prevent wercker cli from polluting project directories
# Prevent wercker from polluting repositories
#
# Usage:
# Add this to your .bashrc or .zshrc
function wercker() {
# To prevent collisions between projects (i.e., directories) with the same
# name in different locations in your file system, we append a SHA of the
# project path to the project name.
project_name=$(basename $(pwd))-$(shasum <(pwd)|awk '{print $1}')
wercker_dir=~/.wercker/projects/$project_name
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/regions"|jq '.regions | length'
(for i in $(aws ec2 describe-regions|jq -r '.Regions[].RegionName'); do
aws ec2 describe-availability-zones --region $i|jq '.AvailabilityZones[].ZoneName';
done)|wc -l
@inz
inz / rename_files.rb
Last active August 29, 2015 14:09
DSLab 14W Rename Submission Files from Harvest
#!/usr/bin/env ruby
require 'fileutils'
MAPPING='dslab14-account-mapping.txt'
FOLDER=ARGV.first || 'DSLab-Harvest-1237'
TARGET=File.join('processed')
Dir.mkdir(TARGET) rescue nil
# Map users to immatriculation numbers.
users = {}
@inz
inz / keybase.md
Created April 6, 2014 18:02
keybase.md

Keybase proof

I hereby claim:

  • I am inz on github.
  • I am inz (https://keybase.io/inz) on keybase.
  • I have a public key whose fingerprint is B57B 9BD2 96A4 A080 DCAC 7BF4 A77D D037 7841 1085

To claim this, I am signing this object:

@inz
inz / install_gitorious.sh
Created October 14, 2011 14:24
Gitorious Installation using chef-solo
#!/bin/bash
#
# Install gitorious using chef-solo
set -e
echo "Updating package cache..."
apt-get -qq update
echo "Setting gem command defaults.."
@inz
inz / log4j configuration
Created September 6, 2011 15:21
Policy Optimization: Additional Material
log4j.rootLogger=DEBUG, OPT
log4j.appender.OPT=org.apache.log4j.RollingFileAppender
log4j.appender.OPT.File=opt.log
log4j.appender.OPT.layout=org.apache.log4j.PatternLayout
# Canonical Log Format Pattern
log4j.appender.A1.layout.ConversionPattern=%d %m%n
@inz
inz / README.mkd
Created April 19, 2011 12:56
List svn authors for easier migration to Git