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
import logging | |
import boto3 | |
from argparse import ArgumentParser, HelpFormatter | |
from botocore.exceptions import ClientError, ProfileNotFound | |
# logger config | |
logger = logging.getLogger() | |
logging.basicConfig(level=logging.INFO, | |
format='%(message)s') |
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
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
grep '"tag_name":' | # Get tag line | |
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
} | |
# Usage | |
# $ get_latest_release "creationix/nvm" | |
# v0.31.4 |
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
/* | |
* Usage : node generateWhoisConf.js > /etc/whois.conf | |
*/ | |
var json = require('comment-json'); | |
var request = require('request'); | |
request('https://github.com/weppos/whois/raw/master/data/tld.json', function(error, response, body){ | |
var obj = json.parse(body); | |
Object.keys(obj).forEach(function(key){ |
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
var connectionString = 'postgres://localhost:5432/postgres'; | |
var Promise=require('bluebird'); | |
var knex = require('knex')({ | |
client: 'pg', | |
connection: { | |
user: 'postgres', | |
database: 'postgres', | |
port: 5432, |