Skip to content

Instantly share code, notes, and snippets.

@DimShadoWWW
DimShadoWWW / functions.sh
Created April 30, 2014 23:07
configuring vulcand from bash
function genID() {
echo $RANDOM
}
function addHost() {
if [[ -z $3 ]]
then
"addHost hostname ipaddress port"
exit 1
fi
import json
import os
import re
import sys
import logging
import datetime
import time
import db_access
import subprocess
% A few example commands for a more git-aware LaTeX.
% Note that this requires you to run pdflatex/xelatex/etc. with the
% `--shell-escape' option which is extremely unsafe. Use with care
% and *never* use with plain TeX.
% Print the short-hash of the current commit
\newcommand*{\gitrev}{%
\immediate\write18{%
rm gitrev.tex 2> /dev/null; git rev-parse --short HEAD > gitrev.tex
}%