Skip to content

Instantly share code, notes, and snippets.

0:00:17.190,0:00:20.510
On m'a demandé de faire un de ces "Ma vie en dessin".
0:00:20.510,0:00:22.850
Je ne suis pas sûre que ça donne
quelque chose de bien.
0:00:22.850,0:00:25.330
Ce n'est pas, euh... argh...
@Menencia
Menencia / gist:6efed162788c41e12c63
Created June 29, 2014 19:04
compile js file with transpilator (v6 => v5)
"use strict";
var Item = function Item(game) {
this.game = game;
this.number = 1;
this.equipped = 0;
};
($traceurRuntime.createClass)(Item, {
load: function(data) {
for (var i in data) {
this[i] = data[i];
@Menencia
Menencia / gist:10632634
Created April 14, 2014 09:40
Compile coffee files in a directory (and his sub-directories)
coffee -bc src/*
@Menencia
Menencia / gist:7988732
Created December 16, 2013 15:22
clickingff7
Cloud : Atk group +10%
Barret : HP group +10%
Red XIII: Critical hits +10%
Youffie : Magic find +10%
Cait Sith: Gils +10%
Aerith : Restore +10%
Tifa : Magic Atk +10%
Vincent : EXP group +10%
Cid : AP group +10%
@Menencia
Menencia / gist:7530820
Last active December 28, 2015 16:39
Returns an array of x random elements with the sum of X
// Returns an array of x random elements with the sum of X
function randomArray(X, max) {
var last = -1, res = [];
while (X > 0 && res.length < max) {
var x = Math.ceil(Math.random()*X);
res.push(x);
X -= x;
last += 1;
}
if (X > 0) {
@Menencia
Menencia / readme.md
Last active March 8, 2022 18:29
Script to update a git project

Update a git repo

With this script, you can easily update a git repo.

Install

curl -# https://gist.githubusercontent.com/Menencia/6435756/raw/update.sh > update.sh
curl -# https://gist.githubusercontent.com/Menencia/6435756/raw/version.sh > version.sh
@Menencia
Menencia / gist:4594742
Last active December 11, 2015 11:38
nodejs server chat
#server
logins = []
io.sockets.on 'connection', (client) ->
client.on 'join', (data) ->
# checks if data.login account exists
db.users.findOne {login: data.login}, (err, user) ->
# user found
###
SERVER
###
port = 3000
fs = require('fs')
express = require('express')
cookie = require('express/node_modules/cookie')
app = express()
// Generated by CoffeeScript 1.3.3
/*
SERVER
*/
var app, cookie, db, express, fs, io, port, server;
port = 3000;
fs = require('fs');
[
{ "keys": ["super+t"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
{ "keys": ["super+p"], "command": "show_overlay", "args": {"overlay": "command_palette"} },
{ "keys": ["super+d"], "command": "duplicate_line" },
{ "keys": ["super+shift+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["super+k"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
{ "keys": ["ctrl+shift+c"], "command": "show_original_part" },
{ "keys": ["ctrl+shift+r"], "command": "replace_modified_part" },
{ "keys": ["ctrl+shift+d"], "command": "show_diff" },