Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am abriemme on github.
  • I am abriemme (https://keybase.io/abriemme) on keybase.
  • I have a public key ASAYmeTvrGnDpSsSdSSBvDCxWajaVFtDLpJ2dUy_h3mbxgo

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am abriemme on github.
  • I am abrymaxime (https://keybase.io/abrymaxime) on keybase.
  • I have a public key whose fingerprint is 2288 7E3B 5245 E3C4 A4AB 3D42 5FC4 9A22 9A32 9ECC

To claim this, I am signing this object:

View es.sh
cd ~
##If you want to install OpenJDK
#sudo apt-get update
#sudo apt-get install openjdk-8-jre-headless -y
###Or if you want to install Oracle JDK, which seems to have slightly better performance
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
@abriemme
abriemme / tiny$.js
Created Nov 12, 2014
super-tiny jQuery-like API JavaScript library
View tiny$.js
/*
* for more info see : https://github.com/dciccale/ki.js/blob/master/ki.js
* ie8 compatible !!
* included functions : $.create, $.each $.isFunction, on, off, hasCLass, addClass, removeClass, each show, append, hide, hmtl, attr, removeAttr, css, remove, ...
* usefull for developing third-party jsavascript widgets
*/
!function (window, document, array, prototype, event_listener) {
f = document['add' + event_listener]
function init(selector, d, i) {
@abriemme
abriemme / reply_regex.py
Last active Aug 29, 2015
Email reply parser (python) fr+en
View reply_regex.py
import re
REPLY_SPLITTER_REG = re.compile(r"^From:\s*[a-zA-Z0-9.\+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}|^From:\s.*\[mailto:[a-zA-Z0-9.\+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}\]|^On\s.*\s<[\s|][a-zA-Z0-9.\+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}>[\s|]wrote:$|^On\s.+?wrote:$|^Le\s.*\s<[\s|][a-zA-Z0-9.\+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}>[\s|]a\sécrit\s:$|^Le\s.+?a\sécrit\s:$|^.*<[a-zA-Z0-9.\+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}>.*$|^-+[\s|]Message\stransféré[\s|]-+$|^-+[\s|]Original\s+Message[\s|]-+$|^-+[\s|]Reply Message[\s|]-+$|^Sent.*from.*my.*|^envoyé\s+depuis\s+mon.*| ^envoyé\s+de\s+mon.*|^" + 'reply above this line' + "|^↑ Merci de répondre par dessus cette ligne ↑$|^-- $|^>\s|^[-|_]{3,}$|^\*{5,}DISCLAIMER\*{5,}$|^—$", re.I | re.M)
#try it here : http://regex101.com/r/oE7sC7/3
View Sublime Text License Key
crack Sublime Text (2 and 3)
1. Open Sublime in a HEX editor (the executable file)
2. Find 43 33 33 42 30 32
3. Replace in the string 33 42 with 32 42
4. Save
5. Enter the license below:
—–BEGIN LICENSE—–
Patrick Carey
@abriemme
abriemme / tmpl.js
Last active Dec 26, 2015
Very very simple jQuery templating "engine"
View tmpl.js
function tmpl(template, data) {
return template.text().replace(/\{([\w\.]*)\}/g, function(str, key) {
var v = data[key];
return (typeof v !== "undefined" && v !== null) ? v : "";
})
}
/*
Usage:
View Reactive-CSS-Transitions.markdown

Reactive CSS Transitions

These simple CSS blocks are alive. Each block reacts to its neighbors by transforming border-radius and color. Endless block formations, endless reactions between them.

A Pen by Yogev Ahuvia on CodePen.

License.

View gist:6304870

Sublime Text – Useful Shortcuts

General

Ctrl+KB toggle side bar
Ctrl+Shift+P command prompt
Ctrl+` python console
Ctrl+N new file

Editing

@abriemme
abriemme / store.js
Last active Dec 14, 2015
HTML5 LocalStorage Array and objects
View store.js
Storage.prototype.setObj = function(key, obj) {
return this.setItem(key, JSON.stringify(obj));
}
Storage.prototype.getObj = function(key) {
var value = this.getItem(key);
return value && JSON.parse(value);
}