Skip to content

Instantly share code, notes, and snippets.

View arcanis's full-sized avatar

Maël Nison arcanis

View GitHub Profile
if (a)
if (b)
if (c) // wrong indent
; // wrong indent
for (let type in types)
doSomething(type); // should be indented
for (let type of types)
doSomething(type); // should be indented
This file has been truncated, but you can view the full file.
[[[0.03100680559873581,0.03100680559873581,0.02847377024590969,0.028717918321490288,0.028717918321490288,0.03024384379386902,0.026612140238285065,0.03265480697154999,0.03265480697154999,0.020966216921806335,0.021820735186338425,0.006317331455647945,0.006317331455647945,-0.056581318378448486,-0.06955168396234512,-0.061342205852270126,-0.061342205852270126,-0.06695760786533356,-0.0632648691534996,-0.06482131779193878,-0.06482131779193878,-0.06433302164077759,-0.0640278309583664,-0.0636310949921608,-0.0636310949921608,-0.07016205042600632,-0.07663197815418243,-0.07492294162511826,-0.07492294162511826,-0.07525864243507385,-0.07513657212257385,-0.07480086386203766,-0.07480086386203766,-0.07473982870578766,-0.07477034628391266,-0.07412946224212646,-0.07412946224212646,-0.07473982870578766,-0.07379375398159027,-0.07379375398159027,-0.07422101497650146,-0.08294931054115295,-0.08606220036745071,-0.08606220036745071,-0.08520767837762833,-0.08474989980459213,-0.08560442179441452,-0.08560442179441452,-0.08319345861673355
@arcanis
arcanis / pre-commit.sh
Last active August 29, 2015 14:06
Linting Moumoute
#!/usr/bin/env bash
result=0
cd "$(git rev-parse --show-toplevel)"
# Stash the current changes, so that we preserve them
git stash -q --keep-index
# Get the list of changed files from the index
var startEmulator = function (rom) {
var engine = Virtjs.create(Virtjs.engine.GameBoy, {
devices : {
screen : new Virtjs.screen.WebGL(),
input : new Virtjs.input.Keyboard({ map : map }),
timer : new Virtjs.timer.RAFrame(),
data : new Virtjs.data.LocalStorage()
},
barDemo.selectAll("rect").
data(data).
enter().
append("svg:rect").
attr("x", function(datum, index) { return x(index); }).
attr("y", function(datum) { return height - y(datum.books); }).
attr("height", function(datum) { return y(datum.books); }).
attr("width", barWidth).
attr("fill", "#2d578b");
@arcanis
arcanis / README.md
Last active January 2, 2016 14:09
Custom git command for Pivotal / Github

Git Pivotal

git pivotal --start <branch_01234567>|<01234567>
  Creates a new branch, sets its upstream to the correct remote branch then
  sets the task state to 'started'. If the branch name is omitted, the script
  will use the name of the current branch. If the branch name only contain an
  issue ID, the script will try to make use of the _git_pivotal completion.

git pivotal --clean

Javascript

define( 'ace/mode/pegjs', [
'ace/lib/oop',
'ace/mode/text_highlight_rules',
'ace/mode/javascript_highlight_rules'
], function ( oop, textHighlightRules, javascriptHighlightRules ) {
'use strict';
diff --git a/src/library.js b/src/library.js
index 84071b6..ae61697 100644
--- a/src/library.js
+++ b/src/library.js
@@ -5794,7 +5794,7 @@ LibraryManager.library = {
dlopen: function(filename, flag) {
// void *dlopen(const char *file, int mode);
// http://pubs.opengroup.org/onlinepubs/009695399/functions/dlopen.html
- filename = (ENV['LD_LIBRARY_PATH'] || '/') + Pointer_stringify(filename);
+ filename = filename ? (ENV['LD_LIBRARY_PATH'] || '/') + Pointer_stringify(filename) : '';