Skip to content

Instantly share code, notes, and snippets.

View joallard's full-sized avatar

Jonathan Allard joallard

View GitHub Profile
@joallard
joallard / gist:2004844
Created March 9, 2012 03:22
Howto git
# Initial setup
$ git config --global user.name "Bob Sponge"
$ git config --global user.email "bob.sponge@spongebob.com"
$ cd project/
$ git init
$ git add .
$ git commit -am "initial commit"
$ git add remote or whatever??? # suivre instructions sur github
$ git push
@joallard
joallard / srjndq-rcl.md
Created July 14, 2012 21:01
Règlement sur les courses au leadership

Règlement sur les courses au leadership (SRJNDQ, c. C-1)

  1. Les JNDQ, incluant les instances gouvernantes, ne peuvent appuyer une candidature lors d'une course à la chefferie.

  2. Le présent règlement ne peut être modifié qu'avec l'unanimité d'un congrès dûment formé.

  3. Le présent règlement n'empêche pas un membre d'appuyer en son nom personnel une telle candidature.

Motion de félicitations et de reconnaissance envers le comité organisateur du congrès 2012 JNDQuoi? (JNDQ-12CE1-M1)

Proposée par Jonathan Allard, secondée par Eddy Pérez
ADOPTÉ À UNANIMITÉ

  • CONSIDÉRANT que le dernier congrès a été un immense succès
  • CONSIDÉRANT que le comité Congrès a mis beaucoup d'efforts pour organiser ce Congrès

Le comité exécutif des JNDQ:

main(i)
{
for(i=0;;i++)
putchar(((i*(i>>8|i>>9)&46&i>>8))^(i&i>>13|i>>6));
}
@joallard
joallard / git-rename-author.sh
Created April 14, 2013 22:52
Git Rename Author
#!/bin/sh
OLD_NAME="old"
NEW_NAME="New Oldman"
NEW_EMAIL="new.oldman@mail"
git filter-branch -f --commit-filter "
if [ \"\$GIT_COMMITTER_NAME\" = \"$OLD_NAME\" ];
then
GIT_COMMITTER_NAME=\"$NEW_NAME\";
GIT_AUTHOR_NAME=\"$NEW_NAME\";
@joallard
joallard / oop.rb
Last active December 16, 2015 05:39
OOP Ruby Quickstart
class Person
attr_reader :name
# short for:
# def name
# @name
# end
def initialize(name)
@name = name
end
@joallard
joallard / ducks.rb
Last active December 16, 2015 05:38
Ruby Modules and Duck-typing
module Drinker
# can do, same implementation thank duck typing
def resolve_thirst
drink_water
end
end
class Person
include Drinker
@joallard
joallard / .md
Created June 26, 2013 20:57
Interpreting Apartment-for-Rent Postings - A Satirical Look at Apartments in Montreal

“Affordable”: Dirty

“Student atmosphere”: Very dirty

“Downtown”: Overpriced

@joallard
joallard / jndq-13-co-r6.md
Last active December 19, 2015 10:29
Résolution pour légaliser, réglementer, et taxer le cannabis

Résolution 6 : Résolution pour légaliser, règlementer et taxer le cannabis

Congrès des Jeunes néo-démocrates du Québec, 2013
Adoptée à majorité

Proposée par Mathieu Mireault

IL EST RÉSOLU QUE le NPD affirme son engagement à légaliser, réglementer et taxer de manière appropriée le cannabis (marijuana);

IL EST ÉGALEMENT RÉSOLU qu'un gouvernement NPD investira massivement dans des programmes de prévention, dans l'éducation publique et dans la promotion de la santé en ce qui concerne la consommation de cannabis;

@joallard
joallard / .gitconfig
Created August 28, 2013 16:07
Git aliases
[alias]
co = checkout
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
# Show short status with current branch name
st="!f() { br=$(git status | head -1) && echo "${br}" && git status -s; }; f"