Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Belin atomrc

View GitHub Profile
View keybase.md

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 Oct 28, 2015
Stupid fallback for localStorage when browser doesn't support it
View localStorageFallback.js
/**
* 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 Aug 29, 2015
A ridiculously small directive compiler
View compiler.js
/**
* 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 Aug 29, 2015
Automatic Facebook pokeback. To use it, just go to www.facebook.com/pokes and copy paste the code into your browser console. Enjoy ;)
View pokeback.js
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);