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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set mailserver smtp.gmail.com port 587 username "[email protected]" password "password" using tlsv1 with timeout 30 seconds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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 }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Microsoft.Win32; | |
namespace RegCheck | |
{ | |
class Program | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS foo; | |
CREATE TEMPORARY TABLE foo (x FLOAT); | |
INSERT INTO foo VALUES (1); | |
INSERT INTO foo VALUES (2); | |
INSERT INTO foo VALUES (3); | |
INSERT INTO foo VALUES (4); | |
INSERT INTO foo VALUES (100); | |
SELECT avg(x), tmean(x, 2.0), tmean(x, 1.5) FROM foo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Micro JavaScript Dependancy Injection | |
define = (name, val) -> | |
#init modules map if missing | |
define.mods = define.mods or {} | |
#store 'name' | |
define.mods[name] = val | |
inject = (fn) -> | |
#regex match on function.toString() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -ne 2 ]; then | |
echo "Usage: $0 file partSizeInMb"; | |
exit 0; | |
fi | |
file=$1 | |
if [ ! -f "$file" ]; then |
OlderNewer