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
  • 03:49 (UTC +02:00)
View GitHub Profile
-- number of seconds before rebooting the machine, use -1 to disable
local timeToReboot = 300
--time in seconds between updates
local sleepTime = 1
-- what level to enchant items at
local enchantAtLevel = 30
config.json
reading-image.png
class Game
constructor: ()->
draw: ()->
update: ()->
run: (()=>
skipTicks = 1000/@fps
maxFrameSkip = 10
@kane-thornwyrd
kane-thornwyrd / ._Drupal_tools.md
Last active December 20, 2015 05:19
Some modules worth throwing as a starter kit.

Just a set of tools for Drupal Dev

@kane-thornwyrd
kane-thornwyrd / index.html
Created August 11, 2013 10:34
A Backbone.js + Require.js + jQuery + Underscore + jQuery plugins + Backbone plugins freely borrowed and tweaked from http://backbonetutorials.com/organizing-backbone-using-modules/ .
<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
@kane-thornwyrd
kane-thornwyrd / nexter.coffee
Created August 11, 2013 13:09
To make elusive lists with splats at the end, Facebook "who liked" list style.
class nexter
constructor: (values, howMany, @el)->
@setValues.apply this, arguments
@render()
tpl: (data)->
out = ''
out += '<ul class="nexter">'
out += '<li>' + value + '</li>' for value in data.values
(function($, doc){
$('#flou1,#flou2,#flou3,#flou4').hide();
$('#kling').click(function() {
$('#appz,#vid,#spiele').toggle();
$('#flou2,#flou3,#flou4').toggle();
});
$('#appz').click(function() {
$('#kling,#vid,#spiele').toggle();
$('#flou1,#flou3,#flou4').toggle();
//Require Underscore.js http://underscorejs.org/
/*
Large part of this should be done using only CSS, I don't have
the power to impose it.
*/
var runned = false, refreshSizeRuntime = function(){
strict;
if(runned){
@kane-thornwyrd
kane-thornwyrd / Preferences.sublime-settings
Created August 21, 2013 08:05
My Sublime Text Config
{
"auto_complete_commit_on_tab": true,
"color_scheme": "Packages/JavaScriptNext - ES6 Syntax/JavaScriptNext.tmTheme",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"fallback_encoding": "UTF-8",
"font_face": "Monaco",
"font_size": 9,
"highlight_line": true,
"ignored_packages":
@kane-thornwyrd
kane-thornwyrd / ajaxPolling.js
Last active December 22, 2015 17:29
A snippet that wrap a common ajax object provided by jquery-like libraries. I never tested it, just work few minutes. Maybe it work, maybe not.
var AjaxPolling = function(url, data, interval, settings){
//Optionnal parameters filling.
if(typeof settings === 'undefined'){ settings = {};}
if(typeof interval === 'undefined'){ interval = null;}
//Setting Object attributes.
this.url = url;
this.settings = $.extend(true,
{}, settings, AjaxPolling.prototype._defaultSettings