Skip to content

Instantly share code, notes, and snippets.

View arcanis's full-sized avatar

Maël Nison arcanis

View GitHub Profile
let refCount = 0;
let resolvers = [];
function resolveAll() {
for (let resolve of resolvers)
resolve();
resolvers = [];
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
@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) : '';
@arcanis
arcanis / gist:5780938
Created June 14, 2013 10:41
Résultat d'un `tree` sur Castel
.
└── castel
├── ast
│ ├── expr
│ │ ├── Binary.hh
│ │ ├── Conditional.hh
│ │ ├── External.hh
│ │ ├── literal
│ │ │ ├── Boolean.hh
│ │ │ ├── Class.hh
MyEventManager.prototype.bootstrap = function ( ) {
var self = this;
this.listen( 'myEvent', function ( ) {
self.myEventListener( );
} );
};
// ---
var array = [ 1, 2, 3 ];
PonyOS
http://www.ponyos.org/
Blizzard - Starcraft : Warhound is back
https://us.battle.net/sc2/en/blog/9369235
Atlassian - JIRA Jr
http://www.atlassian.com/jirajr/
Lambda The Ultimate - Migration to Facebook