Skip to content

Instantly share code, notes, and snippets.

TheHippo / Makefile
Created Mar 31, 2016
Golang Makefile example
View Makefile
OUT := binariy-name
PKG :=
VERSION := $(shell git describe --always --long --dirty)
PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/)
GO_FILES := $(shell find . -name '*.go' | grep -v /vendor/)
all: run
go build -i -v -o ${OUT} -ldflags="-X main.version=${VERSION}" ${PKG}
xkr47 /
Created Oct 6, 2015
rxvt-unicode: Enable Ctrl-Insert/Ctrl-Shift-c to copy to CLIPBOARD (as opposed to PRIMARY) selection. Pasting works by Meta-<middle button>
#! perl
# Store this file as /usr/lib/urxvt/perl/xkr-clipboard
# To enable, add to ~/.Xresources:
# URxvt.perl-ext-common: default,xkr-clipboard
# URxvt.iso14755: false
# URxvt.keysym.Shift-Control-C: perl:clipboard:copy
# URxvt.keysym.Control-Insert: perl:clipboard:copy
View gist:ba6b78e24c315a7f5e3c
* @BeforeScenario
public function captureConsoleLog() {
if (!($this->getSession()->getDriver() instanceof \Behat\Mink\Driver\Selenium2Driver)) {
// Not a Selenium driver (e.g. PhantomJs).
acolyer /
Last active Apr 14, 2021
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
zcourts /
Created May 7, 2014
Because the standard install doesn't always work!
cd /tmp
git clone
cd zeromq4-x
make install
jameshfisher /
Created Apr 12, 2014
Restore a file from the package that provides it.
# Usage:
# sudo ./ <filepath>
# Restore a file from the package that provides it.
# Source:
miguelmota /
Last active Apr 7, 2021
Multiple accounts with Mutt E-Mail Client (gmail example)

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg


Directories and files

mremond / boxcar_push.php
Created Feb 6, 2014
Send a Boxcar notification to your device in PHP
View boxcar_push.php
$chpush = curl_init(),
"user_credentials" => 'ACCESS_TOKEN',
"notification[title]" => 'message title',
"notification[long_message]" => '<b>Some text or HTML for the full layout page notification</b>',
rothgar / main.yml
Last active Mar 22, 2021
Generate /etc/hosts with Ansible
View main.yml
# Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source.
# Will include all hosts the playbook is run on.
# Inspired from
- name: "Build hosts file"
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present
when: hostvars[item].ansible_default_ipv4.address is defined
with_items: groups['all']
mattiaslundberg / arch-linux-install
Last active Apr 11, 2021
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
View arch-linux-install
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide ( contains a more verbose description.
# Download the archiso image from
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap