Skip to content

Instantly share code, notes, and snippets.

henfiber /
Last active Dec 3, 2021
Buying keyboards and keyboard components from EU


bitwalker / config.ex
Created Jul 19, 2016
Useful config wrapper for Elixir
View config.ex
defmodule Config do
@moduledoc """
This module handles fetching values from the config with some additional niceties
@doc """
Fetches a value from the config, or from the environment if {:system, "VAR"}
is provided.
An optional default value can be provided if desired.
gaynetdinov /
Last active Jun 16, 2017 — forked from ericentin/
How to run Ecto migrations from an exrm release
$./bin/my_app rpc Elixir.Application app_dir "[my_app, <<\"/priv/repo/migrations\">>]."
./bin/my_app rpc Elixir.Ecto.Migrator run "['Elixir.MyApp.Repo', <<\"/home/dashboard/uss/lib/my_app-0.0.1/priv/repo/migrations\">>, up, [{all, true}]]."
# => []
bastman /
Created Mar 31, 2016
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see:

$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
View server.go
package main
import (
mprymek / gist:8379066
Last active Nov 19, 2021
Elixir metaprogramming example
View gist:8379066
# This is an example of metaprogramming in the Elixir language.
# We will define a domain specific language (DSL) for the definition
# of a service which is watched by several sensors.
# Each sensor watches some property/functionality of the service and
# returns the result of the check.
# To determine if the service is functioning properly, we need functions
# to run all the sensors' code and gather the returned data.
julionc /
Last active Dec 1, 2021
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
jbenet /
Last active Nov 21, 2021
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

gdamjan /
Last active Nov 14, 2021
Setup for an easy to use, simple reverse http tunnels with nginx and ssh. It's that simple there's no authentication at all. The end result, a single ssh command invocation gives you a public url for your web app hosted on your laptop.


A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.

Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).


ilude / Guest download and install notes
Created May 3, 2012
Install VirtualBox Guest Additions
View Guest download and install notes
# Installing the virtualbox guest additions
VBOX_VERSION=$(cat /etc/vagabond/vbox_version)
cd /tmp
mount -o loop,ro VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
sh /mnt/ --nox11
umount /mnt
rm VBoxGuestAdditions_$VBOX_VERSION.iso