Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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
# -*- 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"
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)
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
+
\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!$.