Skip to content

Instantly share code, notes, and snippets.

View Zenithar's full-sized avatar

Thibault NORMAND Zenithar

View GitHub Profile
@Zenithar
Zenithar / Dockerfile
Last active August 29, 2015 13:57
Nano NGINX
FROM scratch # No parent image
MAINTAINER Thibault NORMAND <me@zenithar.org>
ADD rootfs.tar /
VOLUME ["/var/log/nginx"]
VOLUME ["/www"]
VOLUME ["/etc/nginx/sites-available"]
VOLUME ["/etc/nginx/ssl"]
@Zenithar
Zenithar / keybase.md
Last active August 29, 2015 14:17
keybase.md

Keybase proof

I hereby claim:

  • I am zenithar on github.
  • I am zenithar (https://keybase.io/zenithar) on keybase.
  • I have a public key whose fingerprint is F818 31AF F8EB D14B 8AC8 57F1 E872 2773 022E 7155

To claim this, I am signing this object:

@Zenithar
Zenithar / ldapbinder.go
Created May 20, 2015 07:09
Active Directory Bind authentication with User search (GO)
package main
import (
"fmt"
"log"
"github.com/nmcclain/ldap"
)
var (
@Zenithar
Zenithar / rio.coffee
Created January 11, 2012 22:50
French RIO Checksum and Check procedure
#
# Used to calculate the checksum
# http://fr.wikipedia.org/wiki/Relev%C3%A9_d'identit%C3%A9_op%C3%A9rateur
#
exports.calcChksm = (oo, q, rrrrrr, notel) ->
concatenation = "#{oo}#{q}#{rrrrrr}#{notel}"
ordre = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+"
a = b = c = 0
for i in concatenation
@Zenithar
Zenithar / fix.patch
Last active September 30, 2015 10:10 — forked from krobertson/fix.patch
AUR package vmware-patch patch for Workstation 11.1.2 with 4.2 kernel
commit 1fb71794b4d53d203fc64dc5d57baa5850991303
Author: Ken Robertson <ken@invalidlogic.com>
Date: Tue Sep 29 12:58:00 2015 -0700
Applied patches for Workstation 11.1.2 on 4.2 kernel.
Patches were taken from the VMware forums here:
https://communities.vmware.com/thread/517279
@Zenithar
Zenithar / ext.coffee
Created April 6, 2012 16:36
CoffeeScript command line extension : comments and output minification
# Quoted in http://ww.zenithar.org/2012/04/06/iced-coffeescript-minification/
# Based on https://github.com/jashkenas/coffee-script/wiki/%5BExtensibility%5D-Hooking-into-the-Command-Line-Compiler
#
# Don't forget to install UglifyJS
# npm install -g uglify-js
#
# CoffeeScript = require 'coffee-script'
CoffeeScript = require 'iced-coffee-script'
{parser, uglify} = require 'uglify-js'
@Zenithar
Zenithar / secureHash.coffee
Created July 24, 2012 13:03
Hashing algorithm conform to Owasp.
crypto = require("crypto")
#
# Hashing algorithm conform to Owasp.
# https://www.owasp.org/index.php/Hashing_Java
#
exports.secureHash = (algorithm, key, message, iterations) ->
hash = crypto.createHash(algorithm)
hmac = crypto.createHmac(algorithm, key)
buf = hash.update(key).digest() + message
@Zenithar
Zenithar / application.coffee
Created August 14, 2012 16:43
Iterable Model for Backbone.js
MyCollection = require 'models/mycollections'
MyModel = require 'models/mymodel'
m1 = new MyModel({id: 1, label: 'tata'})
m2 = new MyModel({id: 14, label: 'tete'})
m3 = new MyModel({id: 2, label: 'titi'})
col = new MyCollection()
col.add m1
col.add m2
@Zenithar
Zenithar / multihash.go
Last active November 29, 2015 19:39
One read multiple hash
package main
import (
"crypto/md5"
"crypto/sha1"
"crypto/sha256"
"crypto/sha512"
"fmt"
"hash"
"hash/crc32"
@Zenithar
Zenithar / client.js
Last active December 12, 2015 03:28
Export task as postIt from IceScrum instance
var sys = require('util'),
fs = require('fs'),
rest = require('restler'),
async = require('async'),
_ = require('underscore'),
BASEURL = "http://localhost:8080/icescrum/ws/p/",
SPRINTID = 1,
PRJKEY = "PRJ1";
IceScrum = rest.service(function(u, p) {