Skip to content

Instantly share code, notes, and snippets.

@jtbonhomme
jtbonhomme / gitignore.sh
Created March 5, 2014 14:57
Make gitignore being taken into account
git rm -r --cached .
git add .
git commit -m "fixing .gitignore"
@jtbonhomme
jtbonhomme / sif.js
Created March 12, 2014 22:35
Self Invoking Functions
(function(global) {
'use strict';
console.log("Self Invoking Function 2");
var sif2 = {
prop2: 2,
meth2: function(){
console.log("sif2.meth2");
}
};
@jtbonhomme
jtbonhomme / gitignore.sh
Created July 27, 2014 06:22
Make new .gitignore being applied
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
var fs = require('fs'),
util = require('util'),
Stream = require('stream').Stream;
/**
* Create a bandwidth limited stream
*
* This is a read+writeable stream that can limit how fast it
* is written onto by emitting pause and resume events to
* maintain a specified bandwidth limit, that limit can
$ brew install selenium-server-standalone chromedriver
$ git clone git@github.com:theintern/intern.git
$ cd intern
$ npm install --production
$ ln -s .. node_modules/intern
$ curl https://gist.github.com/neonstalwart/6630466/raw/f0e4e4efbefa40c746f7c68e2bb4fa0dd5215047/selftest.local.intern.js > tests/selftest.local.intern.js
$ java -jar /usr/local/opt/selenium-server-standalone/selenium-server-standalone-2.35.0.jar -p 4444 &
$ node node_modules/intern/runner.js config=tests/selftest.local.intern

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser

@jtbonhomme
jtbonhomme / getRoutes.sh
Last active August 29, 2015 14:07
List all REST API routes
rm routes.txt
for i in *.py; do cat $i | grep "@.*('\/.*')" >> routes.txt; done
@jtbonhomme
jtbonhomme / introrx.md
Last active August 29, 2015 14:09 — forked from staltz/introrx.md

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

@jtbonhomme
jtbonhomme / CrazyradioMacOsX.md
Last active August 29, 2015 14:12
Crazyradio install on Mac Os X (Snow Leopard, then Lion)

This article sum up my installation of crazyradio client on Os X. I started on Snow Leopard, but I had to move to Lion.

Install dependencies

Choose the one for your OS (I took the Snowleopard version 2.3.3-10.6)

"""
Script to import multiple directories with textile files into Confluence Wikis. Can be used with OnDemand instances.
To use as redmine migration tool, you need to export wiki pages in textile format. One way is described in: http://stbuehler.de/blog/article/2011/06/04/exporting_redmine_wiki_pages.html
~/redmine $ RAILS_ENV=production ./script/console -s
def export_text(p)
c = p.content_for_version(nil)