Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am Toubib on github.
  • I am toubib (https://keybase.io/toubib) on keybase.
  • I have a public key whose fingerprint is 7106 EBD3 09E2 F527 D037 EBF8 EEA4 6741 3BF5 6820

To claim this, I am signing this object:

@toubib
toubib / shorewall-ipa-graphite.py
Last active June 10, 2016 22:22
shorewall-graphite-grafana
#!/usr/bin/python
# made from https://github.com/graphite-project/carbon/blob/master/examples/example-pickle-client.py
import re
import sys
import time
import socket
import platform
import subprocess
import pickle
import struct
@toubib
toubib / Rocket.Chat.gitlab.js
Created April 19, 2016 12:31
Rocket Chat gitlab push event integration
class Script {
process_incoming_request({
request
}) {
// console is a global helper to improve debug
//console.log(request.headers);
//console.log(request.content);
if (request.content.object_kind === "push") {
@toubib
toubib / gist:6388993
Created August 30, 2013 11:35
SHELL: manage script PID
### PID management
PID_FILE=/tmp/__SCRIPT_NAME__.pid
if [ -f $PID_FILE ];then
OLD_PID=$(<$PID_FILE);SEARCH_PID="x$(ps -p $OLD_PID -o pid h)"
test "$SEARCH_PID" != "x" && die "Already launched (pid $OLD_PID), exit"
fi
echo $$ > $PID_FILE