Skip to content

Instantly share code, notes, and snippets.

@vitalbh
vitalbh / dnsmasq OS X.md
Created July 4, 2017 16:27 — forked from ogrrd/dnsmasq OS X.md
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.dev domains, e.g. project.dev, awesome.dev and so on, without having to add to your hosts file each time.

Requirements

Install

#!/bin/bash
for elm in $@; do
database=$(echo $elm | cut -f1 -d '.')
tables=$(echo $elm | cut -f2 -d '.')
if [ $tables == "{*}" ]; then
tables=$(mysql -uroot -e "SHOW TABLES FROM $database")
tables=$(echo $tables | sed s",^Tables_in_$database,,")
fi
@vitalbh
vitalbh / lint_json.sh
Created October 15, 2015 14:30 — forked from nstielau/lint_json.sh
A one-liner for validating json
# Lint JSON with python (the exit 255 stops xargs after the first failed command)
find . -name "*.json" -print | xargs -Ixx bash -c "echo JSON linting xx 1>&2; cat xx | python -mjson.tool > /dev/null || exit 255"
@vitalbh
vitalbh / XGH - PT-BR.txt
Last active August 29, 2015 14:26 — forked from banaslee/XGH - en.txt
eXtreme Go-Horse Process
Fonte: http://gohorseprocess.wordpress.com
1- Pensou, não é XGH.
XGH não pensa, faz a primeira coisa que vem à mente. Não existe
segunda opção, a única opção é a mais rápida.
2- Existem 3 formas de se resolver um problema, a correta, a errada e
a XGH, que é igual à errada, só que mais rápida.

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

@vitalbh
vitalbh / gist:3420392
Created August 21, 2012 23:22 — forked from douglasmiranda/gist:2555156
Solução para instalar lxml no ubuntu com sucesso =] ( erro em pip install lxml )
#Se o erro for algo parecido com isto:
#building 'lxml.etree' extension
#gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w
#In file included from src/lxml/lxml.etree.c:239:0:
#src/lxml/etree_defs.h:9:31: erro fatal: libxml/xmlversion.h: Arquivo ou diretório não encontrado
#compilação terminada.
#error: command 'gcc' failed with exit status 1
#basta instalar libxml2-dev e libxslt-dev