This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Calcul GRATUIT et pour tous du numéro de TVA intracom français | |
# !! le contrôle de ces clés n'implique pas l'existence réelle du numéro de TVA intracommunautaire !! | |
# Source : https://fr.wikipedia.org/wiki/Code_Insee#Le_num.C3.A9ro_de_TVA_Intracommunautaire | |
SIREN=111222333 && echo "FR $(echo '(12 + (3*(${SIREN} % 97))) % 97' | bc) ${SIREN}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// This is a basic example of running an nsqd instance embedded. It creates | |
// and runs an nsqd with all of the default options, and then produces | |
// and consumes a single message. You are probably better off running a | |
// standalone instance, but embedding it can simplify deployment and is | |
// useful in testing. | |
// See https://github.com/nsqio/nsq/blob/master/nsqd/options.go and | |
// https://github.com/nsqio/nsq/blob/master/apps/nsqd/nsqd.go for |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r := mux.NewRouter() | |
// Single handler | |
r.HandleFunc("/form", use(http.HandlerFunc(formHandler), csrf, logging) | |
// All handlers | |
http.Handle("/", recovery(r)) | |
// Sub-routers | |
apiMiddleware := []func(http.Handler) http.Handler{logging, apiAuth, json} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
import simplejson as json | |
except ImportError: | |
try: | |
import json | |
except ImportError: | |
raise ImportError | |
import datetime | |
from bson.objectid import ObjectId | |
from werkzeug import Response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Create a RAM disk with same perms as mountpoint | |
# Script based on http://itux.idev.pro/2012/04/iservice-speed-up-your-xcode-%D0%BD%D0%B5%D0%BA%D0%BE%D1%82%D0%BE%D1%80%D1%8B%D0%B5-%D1%81%D0%BF%D0%BE%D1%81%D0%BE%D0%B1%D1%8B/ with some additions | |
# Usage: sudo ./xcode_ramdisk.sh start | |
USERNAME=$(logname) | |
TMP_DIR="/private/tmp" | |
RUN_DIR="/var/run" | |
SYS_CACHES_DIR="/Library/Caches" |