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
  • 14:30 (UTC +01:00)
View GitHub Profile
@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'
---- Minecraft Crash Report ----
// Don't be sad. I'll do better next time, I promise!
Time: 02/11/14 10:19
Description: There was a severe problem during mod loading that has caused the game to fail
cpw.mods.fml.common.LoaderException: java.lang.NoSuchMethodError: buildcraft.api.recipes.IRefineryRecipeManager.addRecipe(Ljava/lang/String;Lnet/minecraftforge/fluids/FluidStack;Lnet/minecraftforge/fluids/FluidStack;II)V
at cpw.mods.fml.common.LoadController.transition(LoadController.java:162)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:515)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)
@kane-thornwyrd
kane-thornwyrd / mcmod.info
Created November 2, 2014 10:38
The LegacyCraft's mcmod.info proper JSON
[
{
"modid": "",
"name": "",
"description": "",
"version": "V2",
"mcversion": "1.7.10",
"url": "",
"updateUrl": "",
"authorList": ["Reika"],
// Only add setZeroTimeout to the window object, and hide everything
// else in a closure.
(function() {
var timeouts = [];
var messageName = "zero-timeout-message";
// Like setTimeout, but only takes a function argument. There's
// no time argument (always zero) and no arguments (you have to
// use a closure).
function setZeroTimeout(fn) {
#!/bin/bash
while true
do
ls /run/user/1000/gvfs/ftp* &> /dev/null
sleep 15
done
{
"always_prompt_for_file_reload": true,
"always_show_minimap_viewport": true,
"auto_complete_commit_on_tab": true,
"auto_complete_with_fields": true,
"auto_find_in_selection": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Monokai Extended/Monokai Extended.tmTheme",
"default_line_ending": "windows",
"draw_indent_guides": true,