Skip to content

Instantly share code, notes, and snippets.

View kane-thornwyrd's full-sized avatar
🏠
Working from home

Jean-cédric T. kane-thornwyrd

🏠
Working from home
  • France
  • 06:47 (UTC +02:00)
View GitHub Profile
/**
* A Quick and Dirty snippet to create iFrame Popups out of things…
* Require jQuery || Ember.js
*
* @class ModalIFrame
*
* @param {DOMElement} el The element acting as a launcher.
* @param {Object} options Defaults:
* {
* openEvent: 'click',
@kane-thornwyrd
kane-thornwyrd / .bash_aliases
Last active December 25, 2015 16:39
Used on my windows session with Cygwin.
bind '"\e[A"':history-search-backward
bind '"\e[B"':history-search-forward
export DRIVE_C="/cygdrive/c"
export EDITOR="nano.exe"
export CDPATH=.:~:/var/www:$DRIVE_C:$DRIVE_C/Users/jctherond:$DRIVE_C/Program\ Files
export HISTCONTROL=ignoredups:ignorespace
history -a
shopt -s histappend
shopt -s checkwinsize
var multiAction = function(action, nb, delay){
this.action = action;
this.nb = nb;
this._nb = this.nb;
this.delay = delay;
}
multiAction.prototype = {
var Carrousel = function(el, from, to, delay){
"strict";
this.el = el;
this.delay = delay;
this.from = from;
this.to = to;
this.init();
};
@kane-thornwyrd
kane-thornwyrd / holyshit.js
Created March 7, 2014 17:04
I was casually writting a player library for HTML5 audio when…
function getAudioCallback(player, eventName){
var
callbackName = 'on' + eventName.charAt(0).toUpperCase() + eventName.substr(1),
self = this;
;
return _.throttle(_.bind(self.audioCallbacks[callbackName], self, player),500);
}
---- Minecraft Crash Report ----
// Surprise! Haha. Well, this is awkward.
Time: 19/04/14 16:46
Description: Exception getting block type in world
java.lang.NullPointerException
at tropicraft.world.schematic.CustomGenKoaHut.placeDownTilGround(CustomGenKoaHut.java:28)
at tropicraft.world.schematic.CustomGenKoaHut.genPassPre(CustomGenKoaHut.java:20)
at build.world.BuildJob.buildStart(BuildJob.java:153)
@kane-thornwyrd
kane-thornwyrd / expand.js
Last active August 29, 2015 14:01
expand.js
files: [{
expand: true,
cwd: 'source',
src: [ '**/*.styl' ],
dest: 'build',
ext: '.css'
}]
​​var $body = $('body');
var bodySizeInform = function bodySizeInform(){
$body.width(document.width);
​ ​$body.​height(​document.height);
​ return true;​
}
bodySizeInform = _.throttle(bodySizeInform, 500);
bodySizeInform();
$(window).resize(bodySizeInform);
@kane-thornwyrd
kane-thornwyrd / gist:3963c321845a685cf7b6
Last active August 29, 2015 14:08
Coffeescript Syntactic Diabetes
inside = (what, from)=>
if typeof window isnt 'undefined'
window[what] = from
else
global[what] = from
we = (obj)-> obj
load = (thing)=> inside thing, we require thing
inside '$', we require 'jquery'
load 'assert'