Skip to content

Instantly share code, notes, and snippets.

@erickedji
erickedji / mice.css
Created July 27, 2010 10:52 — forked from jeffkreeftmeijer/mice.css
OMG! Mouses! (from the extremely well designed http://jeffkreeftmeijer.com/2010/experimenting-with-node-js/)
.mouse{
position: absolute;
background-image: url('../images/cursor.png');
width: 15px;
height: 22px;
z-index: 100;
}
@erickedji
erickedji / get_barcode_from_image.js
Created June 10, 2010 06:01 — forked from tobitailor/get_barcode_from_image.js
A javascript barcode scanner!
/*
* 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',
@erickedji
erickedji / strike.js
Created February 4, 2010 22:11
Strike string with unicode diacric
function strike( str ) {
return str.split('').
map(function (e) { return e + '\u0336'; }).
join('');
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
local BLUE="\[\033[0;34m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"
local LIGHT_GREEN="\[\033[1;32m\]"
@erickedji
erickedji / rlsp.rb
Created November 9, 2009 11:54 — forked from h0rs3r4dish/rlsp.rb
#!/usr/bin/ruby
RLSP_VERSION = "1.4.1"
class Lambda
attr_accessor :args, :body
def initialize(args=[],body="")
@args = (args.class == Array) ? args : [args]
@body = body
end
@erickedji
erickedji / NnhpTests.hs
Created October 25, 2009 15:37
[Tests] Ninety-nine haskell problems
import Test.QuickCheck
import Nnhp
{- For most of the problems, randomly choosen parameters
- are not a good test, as some obvious combinations are
- not likely to be generated, not matter how interresting
- they are to the test case at hand.
-}
-- P01
@erickedji
erickedji / Nnhp.hs
Created October 21, 2009 21:33
Ninety-nine Haskell problem (translated from Scheme)
------------------------------------------------------
------------------------------------------------------
-- Ninety-nine Haskell problems
-- KEDJI Komlan Akpédjé <eric.kedji@gmail.com>
-- http://erickedji.wordpress.com/
-- PHD student at IRIT (Toulouse, FRANCE)
--
-- Based on 'Ninety-nine Lisp Problems'
-- (www.ic.unicamp.br/~meidanis/courses/
-- mc336/2006s2/funcional/
@erickedji
erickedji / persistantWindowsEnvVars.py
Created May 8, 2009 19:22
Script to presistently set environment vars on Windows
from _winreg import *
import os, sys, win32gui, win32con
class Penv:
def __init__(self):
path = r'SYSTEM\CurrentControlSet\Control\Session Manager\Environment'
self.reg = ConnectRegistry(None, HKEY_LOCAL_MACHINE)
self.regKey = OpenKey(self.reg, path, 0, KEY_ALL_ACCESS)
def query(self, name):
@erickedji
erickedji / utils.tex
Created May 8, 2009 15:20
LaTeX document utilities
%% Macros d'utilité générale pour documents LaTeX
%%
%% Eric KEDJI <eric.kedji@gmail.com>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% START - macros
\newcommand{\nom}[1]{\textsc{\texttt{#1}}}
\newcommand{\pagevide}{\titlepage\phantom{INVISIBLE}\endtitlepage}
\newcommand{\capture}[4]{
\begin{figure}[#2]
\centering
@erickedji
erickedji / install.py
Created April 27, 2009 20:14
SOA stack install script
# -*- coding: utf-8 -*-
###########################################################
# KEDJI Komlan Akpédjé
#
# SOA Stack components install script
# @depends: penv.py, unzip.py, optionparse.py in PYTHONPATH
#
# NEOXIA Maroc
###########################################################