Skip to content

Instantly share code, notes, and snippets.


Mathieu Leduc-Hamel mlhamel

View GitHub Profile
View gist:2697771
ContactSchema.pre('save', function(next) {
var self = this;
function count() {
.find({author: self.user, recipient:})
.find({author:, recipient: self.user})
mlhamel / gist:2726808
Created May 18, 2012
nodejs buildout config
View gist:2726808
parts = nodejs nodejs-bin
versions = versions
mongodb = 1.8.1
recipe = zc.recipe.cmmi
url =
View gist:2869742 {;
}); {
return member.parent;
}).forEach(function(member) {;
}); {
if(err) {
View gist:6159566
(setq backup-directory-alist
`((".*" . ,(file-name-directory (or load-file-name buffer-file-name)))))
(setq auto-save-file-name-transforms
`((".*" ,(file-name-directory (or load-file-name buffer-file-name)) t)))
# Modified by Travis Lee
# Last Updated: 4/21/14
# Version 1.16
# -changed output to display text only instead of hexdump and made it easier to read
# -added option to specify number of times to connect to server (to get more data)
# -added option to send STARTTLS command for use with SMTP/POP/IMAP/FTP/etc...
# -added option to specify an input file of multiple hosts, line delimited, with or without a port specified (host:port)
mlhamel / gist:83c28fa90afcbe96b673
Last active Aug 29, 2015
Montreal-Python + pythondotorg: interesting tickets
View gist:83c28fa90afcbe96b673
Pythondotorg at Montreal-Python Project Night
The idea is to work on a Django project and to help the Python community by
making the Python website better.
For Installation instructions, please have a look at the following document:
# Download the helper library from
from import Client
# Your Account Sid and Auth Token from
account_sid = ''
auth_token = ''
client = Client(account_sid, auth_token)
fax = client.fax.faxes \
View gist:599b8591e918e46facc9a1aedfdbe495
<!DOCTYPE html>
<html style='height: 100% !important; width: 100% !important; font-family: var(--body_font-family), -apple-system, BlinkMacSystemFont, "San Francisco", Roboto, "Segoe UI", "Helvetica Neue", sans-serif; font-weight: var(--body_font-weight); font-style: var(--body_font-style); line-height: 1.5em; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; margin: 0 auto; padding: 0;'>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="format-detection" content="address=no">