Skip to content

Instantly share code, notes, and snippets.

View atomrc's full-sized avatar

Thomas Belin atomrc

View GitHub Profile

Keybase proof

I hereby claim:

  • I am atomrc on github.
  • I am atomrc (https://keybase.io/atomrc) on keybase.
  • I have a public key whose fingerprint is 5206 BCAB AD4E A2D1 6325 B980 29F4 8D0B 1F53 E348

To claim this, I am signing this object:

@atomrc
atomrc / localStorageFallback.js
Created October 28, 2015 15:50
Stupid fallback for localStorage when browser doesn't support it
/**
* Warning : only use this piece of code
* if storing things in the localStorage is
* NOT vital for your application to work
**/
/* function noop
* simply does nothing
**/
function noop() {}
@atomrc
atomrc / compiler.js
Last active August 29, 2015 14:11
A ridiculously small directive compiler
/**
* compile - compile a set of directive against a piece of DOM
*
* @param {Object} directives - the object containing all the directives to compile
* against the rootElement. The keys of the object are the css selectors
* to retrieve the element in the DOM and the values are the function that
* are applied to each element found :
* {
* "<cssSelector>": function (element) {
* //init element here
@atomrc
atomrc / pokeback.js
Last active August 29, 2015 13:56
Automatic Facebook pokeback. To use it, just go to www.facebook.com/pokes and copy paste the code into your browser console. Enjoy ;)
function pokeback() {
//all the pokeback buttons on the page
var pbButtons = document.querySelectorAll('#poke_live_new a.selected');
for (var i in pbButtons) {
if (pbButtons.hasOwnProperty(i)) {
pbButtons[i].click && pbButtons[i].click();
}
}
}
window.setInterval(pokeback, 200);