Skip to content

Instantly share code, notes, and snippets.

@jtbonhomme
jtbonhomme / gist:5658975
Created May 27, 2013 20:42
ubuntu : changer clavier azerty
loadkeys fr
@jtbonhomme
jtbonhomme / gist:5662448
Created May 28, 2013 12:33
virtualbox , guest addition for ubuntu VM
sudo apt-get install virtualbox-ose-guest-utils virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms
@jtbonhomme
jtbonhomme / gist:5671005
Created May 29, 2013 15:06
perl digest crc16
package Digest::CRC;
use strict;
use vars qw($VERSION $XS_VERSION @ISA @EXPORT_OK %_typedef);
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
@jtbonhomme
jtbonhomme / changelog.sh
Last active December 19, 2015 06:39
edit commits between current tag and last tag
#!/bin/bash
LAST_TAG=`git for-each-ref --sort='*authordate' --format='%(tag)' refs/tags|tail -1`
echo "# CHANGELOG "$LAST_TAG > CHANGELOG.tmp; DELTA=""
for i in `git for-each-ref --sort='*authordate' --format='%(tag)' refs/tags|tail -2`
do DELTA=$DELTA".."$i
done
@jtbonhomme
jtbonhomme / ocr.markdown
Last active December 22, 2015 01:29 — forked from henrik/ocr.markdown

Install ImageMagick (>= 6.8.0-10) for image conversion:

brew install imagemagick

Install leptonica (>= 1.69) and tesseract (>= 3.02.02) for OCR:

brew install leptonica
brew install tesseract --all-languages

Or install without --all-languages and install them manually as needed.

@jtbonhomme
jtbonhomme / index.html
Created October 15, 2013 05:22
Backbone html boilerplate
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="http://documentcloud.github.com/underscore/underscore-min.js"></script>
@jtbonhomme
jtbonhomme / gitignore.sh
Created March 5, 2014 14:57
Make gitignore being taken into account
git rm -r --cached .
git add .
git commit -m "fixing .gitignore"
@jtbonhomme
jtbonhomme / sif.js
Created March 12, 2014 22:35
Self Invoking Functions
(function(global) {
'use strict';
console.log("Self Invoking Function 2");
var sif2 = {
prop2: 2,
meth2: function(){
console.log("sif2.meth2");
}
};
@jtbonhomme
jtbonhomme / gitignore.sh
Created July 27, 2014 06:22
Make new .gitignore being applied
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
var fs = require('fs'),
util = require('util'),
Stream = require('stream').Stream;
/**
* Create a bandwidth limited stream
*
* This is a read+writeable stream that can limit how fast it
* is written onto by emitting pause and resume events to
* maintain a specified bandwidth limit, that limit can