Skip to content

Instantly share code, notes, and snippets.

View oleiade's full-sized avatar
🐫
OCamling

Théo Crevon oleiade

🐫
OCamling
View GitHub Profile

Porcelain

Plumbing

# Check that there are no commit history/objects corrupted
$ git fsck --full --strict

# Get the tree hash a commit is pointing at
$ git rev-parse '6fea31^{tree}'
@oleiade
oleiade / gitcheatsheet.md
Created May 10, 2017 09:04
A Git Cheat Sheet

Porcelain

Plumbing

``bash

Check that there are no commit history/objects corrupted

$ git fsck --full --strict

Get the tree hash a commit is pointing at

$ git rev-parse '6fea31^{tree}'

@oleiade
oleiade / setup-audio-bluetooth-osx.sh
Created February 23, 2016 10:05
Properly configure audio over bluetooth for osx
#!/bin/sh
# Reconfigure bluetooth audio driver
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Max (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool Min (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Max" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Min" 80
@oleiade
oleiade / desired_output.txt
Last active August 29, 2015 14:27
Grouping by state
State Passed Failed Errored Cancelled Started
FinishedAt
2014-07-06 43 23 5 5 5 5
2014-07-13 25 19 1 5 5 5
2014-07-20 141 99 9 27 27 27
2014-07-27 111 82 6 20 20 20
2014-08-03 140 96 19 18 18 18
2014-08-10 131 95 11 15 15 15
2014-08-17 123 87 19 13 13 13
2014-08-24 133 86 35 11 11 11
@oleiade
oleiade / oneline.awk
Created November 5, 2014 10:02
Oneline
{
printf "%s\\n", $0
}
END { print "" }
### Keybase proof
I hereby claim:
* I am oleiade on github.
* I am oleiade (https://keybase.io/oleiade) on keybase.
* I have a public key whose fingerprint is 7BC5 93AE 6E89 1305 B530 4CB5 7AEA 4733 9DF4 D759
To claim this, I am signing this object:
@oleiade
oleiade / probabilities_notations.yaml
Last active August 29, 2015 13:57
Probabilities notations for humans
P(this):
humanized: "probability of this fact to be true"
examples:
- "P(X) really means WHAT IS(The probability of this fact not to be true)"
P(~that):
humanized: "probability of that fact not to be true"
examples:
- P(~X) really means WHAT IS(The probability of that fact not to be true)"
@oleiade
oleiade / ticker.py
Created November 28, 2013 10:55
A ticker python implementation using a multiprocessing.Process
import time
import multiprocessing
from datetime import datetime, timedelta
class Ticker(multiprocessing.Process):
"""
:param wake_interval: in seconds
:type wake_interval: float
@oleiade
oleiade / routes.go
Created November 15, 2013 15:16
Routes mapping
package api
import (
"github.com/codegangsta/martini"
)
type HandlersMap map[string]func(args...interface{})string
type RoutesMapping map[string]HandlersMap
@oleiade
oleiade / compile_leveldb.sh
Last active December 12, 2015 06:39
install_leveldb.sh
#!/bin/sh
SANDBOX_DIR=/tmp/leveldb_install
## Bootstrap a sandbox
create_sandbox() {
if [ ! -d $SANDBOX_DIR ]
then
mkdir -p $SANDBOX_DIR;
fi