Skip to content

Instantly share code, notes, and snippets.

View jfretin's full-sized avatar

Jonathan Fretin jfretin

  • Royal Distribution
  • France
View GitHub Profile
@tobitailor
tobitailor / get_barcode_from_image.js
Created June 1, 2010 19:33
Barcode recognition with JavaScript - Demo: http://bit.ly/djvUoy
/*
* Copyright (c) 2010 Tobias Schneider
* This script is freely distributable under the terms of the MIT license.
*/
(function(){
var UPC_SET = {
"3211": '0',
"2221": '1',
"2122": '2',
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@bentruyman
bentruyman / Custom.css
Created August 17, 2011 00:30
IR_Black Theme for Chrome Developer Tools
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
@rfreebern
rfreebern / README
Created October 3, 2011 19:52
Use bitbucket as a private offsite code backup
Now that bitbucket supports git, it's easy to use their service as a free, private, offsite code backup. Just create an empty repo for your project on bitbucket, add it as a remote to your development repo:
username@host:~/project$ git remote add bitbucket git@bitbucket.org:username/project.git
and use this post-commit hook to silently and automatically push your changes up after each commit.
@jrmoran
jrmoran / Custom.css
Created November 24, 2011 06:01 — forked from star-szr/Custom.css
IR_Black Theme (with sidebar and view-source colors) for Chrome Developer Tools
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
@slok
slok / create_github_bitbucket_mirror.md
Created December 8, 2011 11:30
Create github and bitbucket mirror in gitolite

Create Github/Bitbucket Mirror

Create SSH key and configure

Create Key (no passphrase and name mirror the key)

ssh-keygen -t rsa -N "" -f ~/.ssh/mirror
anonymous
anonymous / bootstrap-notifications.js
Created January 6, 2012 09:43
Javascript for notifications (alerts) for Twitter Bootstrap
/*
I created the following javascript to use bootstrapt's notifications through Javascript.
If you like it you may consider adding it to bootstrapt. Feel free to modify if necessary.
Be sure you define a div #notification-area, where the notifications are going to be displayed by default.
I use it with jQuery 1.7.1 but it should work with older versions. Is also use jquery.hotkeys.js ( https://github.com/jeresig/jquery.hotkeys ) for block messages hotkeys
*/
(function( $ ){
var pub = {
@jasonrudolph
jasonrudolph / git-branches-by-commit-date.sh
Created February 12, 2012 20:40
List remote Git branches and the last commit date for each branch. Sort by most recent commit date.
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r
@endolith
endolith / readme.md
Last active April 13, 2024 17:07
How to stream a webcam to a web browser in Ubuntu

Grr this took hours to figure out. I was trying to install MJPG-streamer and running VLC command lines and all this crap but nothing worked.

First install motion:

~> sudo apt-get install motion

Then create a config file:

~> mkdir ~/.motion

~> nano ~/.motion/motion.conf

@jemmyw
jemmyw / setup-statsd.sh
Created April 4, 2012 12:50 — forked from rw/setup-statsd.sh
Turn an Ubuntu 11.10 EC2 into a StatsD/Graphite server
set -e
# install git
sudo apt-get -y install g++ curl libssl-dev apache2-utils git-core nodejs
# install other graphite dependencies
sudo apt-get -y install python-cairo python-django memcached python-memcache install python-ldap python-twisted apache2 libapache2-mod-python libapache2-mod-wsgi python-django-tagging
# install the Node package manager for later use
curl http://npmjs.org/install.sh | sudo sh