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
server { | |
listen 80; | |
server_name www.yupyupnope.com; | |
rewrite ^/(.*) https://yupyupnope.com/$1 permanent; | |
} | |
server { | |
listen 80; | |
server_name yupyupnope.com; | |
rewrite ^/(.*) https://yupyupnope.com/$1 permanent; |
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
from collections import namedtuple | |
def convert(dictionary): | |
return namedtuple('GenericDict', dictionary.keys())(**dictionary) | |
""" | |
>>> d = dictionary(a=1, b='b', c=[3]) | |
>>> named = convert(d) | |
>>> named.a == d.a | |
True | |
>>> named.b == d.b |
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
from flask import Flask, g, request, flash, url_for, redirect, render_template, abort | |
from flaskext.jsonify import jsonify | |
from flaskext.sqlalchemy import * | |
from sqlalchemy import * | |
from pyodbc import * | |
import logging | |
DATABASE = "dsn=Foo;Trusted_Connection=Yes" | |
SECRET_KEY = "asdasdfasd1234sdagfa23asdfg123" |
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
in upload handler | |
in file close | |
.. | |
---------------------------------------------------------------------- | |
Ran 2 tests in 0.021s | |
OK |
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
#ifndef __FINK_ENDIANDEV_PKG_ENDIAN_H__ | |
#define __FINK_ENDIANDEV_PKG_ENDIAN_H__ 1 | |
/** compatibility header for endian.h | |
* This is a simple compatibility shim to convert | |
* BSD/Linux endian macros to the Mac OS X equivalents. | |
* It is public domain. | |
* */ | |
#ifndef __APPLE__ |
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
function updateElementIndex(el, prefix, ndx) { | |
var id_regex = new RegExp('(' + prefix + '-\\d+)'); | |
var replacement = prefix + '-' + ndx; | |
if ($(el).attr("for")) $(el).attr("for", $(el).attr("for").replace(id_regex, replacement)); | |
if (el.id) el.id = el.id.replace(id_regex, replacement); | |
if (el.name) el.name = el.name.replace(id_regex, replacement); | |
} | |
function addForm(btn, prefix) { | |
var formCount = parseInt($('#id_' + prefix + '-TOTAL_FORMS').val()); |
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
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^b w | |
New new -s <session> Create ^b c | |
Attach att -t <session> Rename ^b , <name> | |
Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
Kill kill-session -t <session> Close ^b & |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<body> | |
<form method="post"> | |
{{ form.hidden_tag() }} | |
{{ form.example }} |
OlderNewer