Skip to content

Instantly share code, notes, and snippets.

View yaf's full-sized avatar

Yannick François yaf

View GitHub Profile
@oloynet
oloynet / credit-agricole.js
Last active June 5, 2018 11:38
This casperjs script return balance and statement from bank "Credit Agricole of Languedoc (France)" for a given account. May work with other agencies. Data are return in json Usage: casperjs credit-agricole.js --auth=12345678912:123456 --json
/**
* This casperjs script return balance and statement from bank "Credit Agricole of Languedoc (France)" for a given account.
* May work with other agencies
*
* Usage:
*
* $ casperjs credit-agricole.js --auth=12345678912:123456
* $ casperjs credit-agricole.js --auth=12345678912:123456 --account=12345678912
* $ casperjs credit-agricole.js --auth=12345678912:123456 --account=12345678912 --json
* $ casperjs credit-agricole.js http://www.ca-languedoc.fr/ --auth=12345678912:123456 --account=12345678912 --json

git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative

Screenshot

@aeden
aeden / txt-data-parser.erl
Created November 30, 2012 18:18
A TXT data lexer in Erlang
parse_txt([C|Rest]) -> parse_txt_char([C|Rest], C, Rest, [], false).
parse_txt(String, [], [], _) -> [String];
parse_txt(_, [], Tokens, _) -> Tokens;
parse_txt(String, [C|Rest], Tokens, Escaped) -> parse_txt_char(String, C, Rest, Tokens, Escaped).
parse_txt(String, [C|Rest], Tokens, CurrentToken, Escaped) -> parse_txt_char(String, C, Rest, Tokens, CurrentToken, Escaped).
parse_txt_char(String, $", Rest, Tokens, _) -> parse_txt(String, Rest, Tokens, [], false);
parse_txt_char(String, _, Rest, Tokens, _) -> parse_txt(String, Rest, Tokens, false).
parse_txt_char(String, $", Rest, Tokens, CurrentToken, false) -> parse_txt(String, Rest, Tokens ++ [CurrentToken], false);
parse_txt_char(String, $", Rest, Tokens, CurrentToken, true) -> parse_txt(String, Rest, Tokens, CurrentToken ++ [$"], false);
parse_txt_char(String, $\\, Rest, Tokens, CurrentToken, false) -> parse_txt(String, Rest, Tokens, CurrentToken, true);
@alphazo
alphazo / .gitignore
Last active October 12, 2015 21:39
ArchLinux Installation Guide - Encrypted SSD (GPT/GRUB2/LUKS/LVM/Systemd)
*.*~
@dgageot
dgageot / git-build
Created May 16, 2012 08:12
Unbreakeable build
#!/bin/bash
function alert_user {
echo "${1}"
which -s growlnotify && growlnotify `basename $0` -m "${1}"
}
function exit_ko {
alert_user "${1}"; exit 1
}
@SteveSongMIT
SteveSongMIT / captainflint.dtl
Created March 20, 2012 22:50
Simple Cowboy web server + ErlyDTL
<html>
<body>
GET squawk:<br />
{{ squawk_get }}<br /><br />
POST squawk:<br />
{{ squawk_post }}<br /><br />
@abailly
abailly / cmd
Created March 8, 2012 08:04
Code from OpaDevCamp #1
opa test.opa hello.opa --database mongo
@caged
caged / graphite.md
Created March 3, 2012 20:25
Installing Graphite on OS X Lion

This is a general overview (from memory) of the steps I used to install graphite (http://graphite.wikidot.com) on OS X Lion. I think the steps are in order but YMMV. Please fork and fix if you find an error.

Install Python 2.7.2

brew install python

Check your env

$ python --version
@psebborn
psebborn / countCSSRules.js
Last active April 25, 2023 11:43
Count the number of rules and selectors for CSS files on the page. Flags up the >4096 threshold that confuses IE
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
countSheet(document.styleSheets[i]);
}
function countSheet(sheet) {