Skip to content

Instantly share code, notes, and snippets.

Pierre Larochelle pierrel

View GitHub Profile
pierrel /
Last active Mar 19, 2017 — forked from daniele-rapagnani/dump_google_spaces.js
Quick and dirty snippet for exporting links from Google Spaces


  1. merge posts with resolution of urls
  2. write times param into wait function (to test only some posts)
pierrel / dev_aws.js
Created Sep 25, 2015
Gets me up and running with my dev ec2 instance
View dev_aws.js
#!/usr/bin/env node
const exec = require('child_process').exec;
const spawn = require('child_process').spawn;
const R = require('ramda');
const myInstance = 'your instance id';
const myKey = 'absolute path to your private key';
const myUser = 'username associated with the key pair';
function isInstanceOff(instanceJson) {
pierrel / starter
Created Apr 13, 2013
Bare-bones clojure + clojurescript + compojure project with working cljs repl
View starter
Start gist
View gist:3837123
<link href="stylesheets/skins.css" media="screen" rel="stylesheet" type="text/css"></link>
<script src=""></script>
<script src=""></script>
<video controls class="video-js vjs-default-skin">
<source type="video/mp4" src=""></source>
pierrel /
Created Sep 14, 2012
Delete all merged branches
# Deletes all branches already merged with master
git checkout master
git pull
for BRANCH in `git branch`; do
git branch -d ${BRANCH}
View Cmd-T
(require 'textmate)
(global-set-key (kbd "M-t") 'textmate-goto-file) ;; for Aquamacs...
pierrel / text_spec.js
Created Jan 6, 2012
word boundary text.js specs
View text_spec.js
it("adds zero-width breaking spaces betwee<wbr>n special characters in the 'content'", function() {
expect(EM.Text.fromBBF({content:"<span class=\"some-class\" style=\"font-size:10\" special chars %^&amp;*"}).get('content'))
.toBe("something containing special chars %<wbr>^<wbr>&<wbr>amp;<wbr>*");
it("preserves the original content in 'raw_content'", function() {
expect(EM.Text.fromBBF({content:"something containing special chars %^&amp;*"}).get('raw_content'))
.toBe("something containing special chars %^&amp;*");
pierrel / .gitconfig
Created Sep 7, 2011
git core editor
View .gitconfig
editor = emacs -nw --no-init-file --no-site-file --load ~/.emacs.minimal
View .emacs.minimal
;; taken from
; cutoff for word wrap
(setq-default fill-column 79)
; F12 toggles auto-fill mode
(global-set-key [f12] 'auto-fill-mode)
; C-- keybinding for undo (removes the shift)
(global-set-key [(control -)] 'undo)
pierrel / post-commit
Created Aug 22, 2011
Make sure I didn't commit any debugger lines
View post-commit
This change may contain a debugger line. Please make sure this is not the case before pushing. \n\
if git show | grep -q "debugger"
echo $WARN_ME
You can’t perform that action at this time.