start new:
tmux
start new with session name:
tmux new -s myname
pg = require 'pg' | |
module.exports = pooler = | |
#Get a connection from the pool | |
acquire: (callback) -> pg.connect "tcp://postgres:postgres@localhost/dummy_db", callback | |
#Decorate a function to use the de-pooled connection as a first argument | |
pooled: (fn) -> -> | |
callerCallback = arguments[arguments.length - 1] | |
callerHasCallback = typeof callerCallback == 'function' |
GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.
/* | |
* map predicate to code... | |
* /regex/ --> function (groups, next) | |
* ^ ^ function to call if we should | |
* | \---skip remaining predicates for this line | |
* \- e.g. groups[1] is first regex group, etc | |
*/ | |
function line(predicate, codeblock) { | |
return ({ predicate: predicate, codeblock: codeblock }); |
# coding: utf-8 | |
from __future__ import absolute_import | |
"""Datetime utils. | |
To store time use `naive_to_utc(dt, tz_name)`. | |
To display time use `utc_to_local(dt, tz_name)`. | |
""" | |
import datetime as stdlib_datetime | |
import pytz |
set mailserver smtp.gmail.com port 587 username "[email protected]" password "password" using tlsv1 with timeout 30 seconds |