Skip to content

Instantly share code, notes, and snippets.

\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{amssymb}
\algsetup{indent=2em}
\newcommand{\factorial}{\ensuremath{\mbox{\sc Factorial}}}
\newcommand{\emit}{\ensuremath{\mbox{\sc Emit}}}
\begin{algorithm}[h!] \caption{$\factorial(n)$}\label{alg:factorial} \begin{algorithmic}[1]
\REQUIRE An integer $n \geq 0$. \ENSURE The value of $n!$.
diff --git a/Makefile.am b/Makefile.am
index 5efcea7..23f8311 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,6 +2,8 @@ SUBDIRS = src unittest bin
EXTRA_DIST = README ChangeLog AUTHORS COPYING INSTALL NEWS sumo.doxyconf
+ACLOCAL_AMFLAGS = -I m4
+
require 'github_api'
require 'pry'
raise Exception, "provide your oauth token" if ARGV.empty?
def fetch_repos(github, org)
github.repos.list(org: org, type: 'all', auto_pagination: true).map(&:name)
end
def filter_plugins(repos)
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "99designs/ubuntu-docker"
@linki
linki / clean-branches.sh
Last active August 29, 2015 14:05
cleaning up merged branches
# from the dev branch
git branch --merged | grep -Ev "(\*|release)" | xargs git branch -d
@linki
linki / remove-docker-stuff.sh
Last active August 29, 2015 14:05
remove stopped containers and untagged images
# remove stopped containers
docker rm -f $(docker ps -a -q)
# remove untagged images
docker rmi `docker images | grep '^<none>' | awk '{ print $3 }'`
# or both
docker ps -a -q | xargs docker rm -f && docker images | grep '^<none>' | awk '{ print $3 }' | xargs docker rmi
@linki
linki / git-clean.sh
Last active August 29, 2015 14:05
cleans your local working copy
git checkout $SHA && git reset --hard && git clean -dxf
@linki
linki / ip-address.sh
Last active August 29, 2015 14:07
get the ip address of eth0
root@ocean:~# ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{print $1;}'
=> 80.240.142.239
@linki
linki / list_machines.sh
Last active August 29, 2015 14:07
etcd: list machines in the cluster
curl -L http://127.0.0.1:4001/v2/keys/_etcd/machines
@linki
linki / -
Created December 2, 2014 19:49
brew reinstall
10130 cd Desktop
10132 brew list
10134 rm brews.txt
10135 brew list > ~/Desktop/brews.txt
10136 cat brews.txt
10137 cd `brew --prefix`
10138 rm -rf Cellar
10139 brew prune
10140 rm -rf Library .git .gitignore bin/brew README.md share/man/man1/brew
10141 rm -rf ~/Library/Caches/Homebrew