Skip to content

Instantly share code, notes, and snippets.

View jsilvestre's full-sized avatar

Joseph Silvestre jsilvestre

View GitHub Profile
### Keybase proof
I hereby claim:
* I am jsilvestre on github.
* I am jsilvestre (https://keybase.io/jsilvestre) on keybase.
* I have a public key ASCN7p6AsQeKxQW-Jl6KOuTOTgJOMQzz1gyPTfBqcLj2TQo
To claim this, I am signing this object:
@jsilvestre
jsilvestre / gist:e347f88f09237a054ca134e3da9094bb
Last active February 24, 2017 10:39
Comment tester les applications Cozy v3
#############
|
| Pré-requis : node.js, yarn, docker
| Ajouter dans /etc/hosts : 127.0.0.1 app.cozy.local cozy.local files.cozy.local
|
#############
# Fais toi un dossier quelconque pour les apps v3, par exemple :
mkdir ~/cozy
mkdir ~/cozy/v3
@jsilvestre
jsilvestre / keybase.md
Last active August 29, 2015 14:18
keybase.md

Keybase proof

I hereby claim:

  • I am jsilvestre on github.
  • I am jsilvestre (https://keybase.io/jsilvestre) on keybase.
  • I have a public key whose fingerprint is D676 EF9E 14BA 8238 4058 B1A9 0B0D F8DB 4463 EF2F

To claim this, I am signing this object:

@jsilvestre
jsilvestre / gist:f62391c20230b74404eb
Last active August 29, 2015 14:14
Mocking singleton without class
# If I mock markBroken, it's not used in stopApp because the mock wraps module.exports.markBroken but doesn't change the function itself
markBroken = module.exports.markBroken = (app, err) ->
# does something
module.exports.stopApp = (app) ->
manager = new AppManager
manager.stop app, (err, result) ->
return markBroken app, err if err
# I must do that in order to mock markBroken
@jsilvestre
jsilvestre / controller_using_singleton.coffee
Created January 28, 2015 10:10
Demonstration of the singleton testing problem
singleton = require '../lib/singleton_lib'
module.exports.get = (req, res, next) ->
result = singleton.init()
res.send 200, result.join(',')
@jsilvestre
jsilvestre / gist:a840f483952ec5dbb256
Created December 24, 2014 10:13
erreur npm registry
npm ERR! Error: ENOENT, lstat '/usr/local/cozy/apps/tasky/node_modules/browserify/node_modules/umd/node_modules/ruglify/node_modules/uglify-js/README.md'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 2.6.32-16-pve
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "--production" "--loglevel" "http" "--unsafe-perm" "true" "--user" "cozy-tasky" "install"
npm ERR! cwd /usr/local/cozy/apps/tasky
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
Startup = (coFounders, idea, cash) ->
while cash > 0
coFounders[developer].writeCode coffee, ramen
coFounders[bizDev].workNetwork richParentsFriends
coFounders[productManager].validateIdea fancyShoes, postIts
if acquiredByGoogle
return cash * 1000
else
cash--
@jsilvestre
jsilvestre / pip.log
Created January 11, 2013 16:16
The pip.log error file after using "fab install_indexer"
This file has been truncated, but you can view the full file.
Downloading/unpacking git+git://github.com/frankrousseau/weboob.git@master (from -r requirements/common.txt (line 3))
Cloning Git repository git://github.com/frankrousseau/weboob.git to /tmp/pip-ugFr3p-build
Found command 'git' at '/usr/bin/git'
Running command /usr/bin/git clone git://github.com/frankrousseau/weboob.git /tmp/pip-ugFr3p-build
Cloning into /tmp/pip-ugFr3p-build...
Running setup.py egg_info for package from git+git://github.com/frankrousseau/weboob.git@master
running egg_info
creating pip-egg-info/weboob.egg-info
writing pip-egg-info/weboob.egg-info/PKG-INFO
writing top-level names to pip-egg-info/weboob.egg-info/top_level.txt
@jsilvestre
jsilvestre / gist:4059163
Created November 12, 2012 12:40
Correction du Guide du Gardien by Lockarius
[center][b]Guide du Gardien.[/b][/center]
Je n'ai pas pour ambition ici de vous dévoiler tous les trucs et astuces des "progamers" jouant gardien, tout simplement car je ne suis pas un PGM.
Ici j'ai davantage pour but de partager mon analyse et mes réflexions sur cette classe. Il est d'ailleurs probable (et souhaitable) que d'autres y ajoutent leur point de vue.
Après un certain nombre de réflexion durant la rédaction de ce guide, j'ai finalement décider d'inclure une partie réservé aux traits. Attention toutefois n'y voyez aucun rapport avec une quelconque idée de spécialisation qui reste aux antipodes de ma vision de GW2.
J'ai simplement décidé qu'un tableau récapitulatif des interactions armes/traits serait plus clair et plus simple d'usage dans une optique d'outil pour concevoir vos builds, car après tous c'est la première ambition de ce guide : être un outil pour les joueurs de gardiens qu'ils soient débutant ou non.
Le gardien est tout à la fois un combattant et un caster.
C'est une classe fortement
@jsilvestre
jsilvestre / test.json
Created July 16, 2012 21:21
New JSON format (GW2C)
{
"version" : 1,
"creation_date" : "2012-07-20",
"markers" : {
"trainers":{
"marker_types":{
"trainer_ranger" : {
"markers":[{"id": 1, "lng":-45.636962890625,"lat":29.439597566602927}]},
"trainer_necro" : {
"markers":[]