Skip to content

Instantly share code, notes, and snippets.

View tristan0x's full-sized avatar

Tristan Carel tristan0x

View GitHub Profile
@tristan0x
tristan0x / README.md
Last active August 7, 2017 01:38
Git commit client hook

Git commit client hook

Provides Git hook enforcing commit message.

  • first line length must be less than 50 characters.
  • if applicable, second line may be empty.
  • length of every lines may be less than 72 characters.

Installation instructions

### Keybase proof
I hereby claim:
* I am tristan0x on github.
* I am tristan0x (https://keybase.io/tristan0x) on keybase.
* I have a public key whose fingerprint is 63C2 4004 C26B 04ED 7748 6EED FDDB 2531 06F6 1CF5
To claim this, I am signing this object:
@tristan0x
tristan0x / docker-compose-install.sh
Last active May 31, 2017 09:24
Docker-compose installer
#!/bin/sh -e
PREFIX=${PREFIX:-/usr}
NAME=${NAME:-docker-compose}
DOCKERCOMPOSE_VERSION=${DOCKERCOMPOSE_VERSION:-1.1.0}
VENV_PATH="${PREFIX}/${NAME}"
VIRTUALENV=${VIRTUALENV:-virtualenv}
if ! [ -d "$PREFIX" ] ; then
@tristan0x
tristan0x / hip-py-log
Last active August 29, 2015 14:12
Python logs beautifier
#!/usr/bin/awk -f
# Python logs beautifier
# Handled multi-line errors when each line starts with the ↪
# Example of usage:
# tail -f celery.log | hip-py-log
BEGIN {
# color code of the previous line
#!/bin/bash
JAVA="jdk-8u5-linux-x64"
JAVA_URL="http://download.oracle.com/otn-pub/java/jdk/8u5-b13/$JAVA.tar.gz"
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" $JAVA_URL
mkdir -p ~/java
tar -xzf $JAVA.tar.gz -C ~/java --strip-components=1