Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
<?xml version="1.0"?> | |
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:zapi="http://zotero.org/ns/api"> | |
<title>Zotero / urschrei / Collections</title> | |
<id>http://zotero.org/users/436/collections?limit=5&content=json</id> | |
<link rel="self" type="application/atom+xml" href="https://api.zotero.org/users/436/collections?limit=5&content=json"/> | |
<link rel="first" type="application/atom+xml" href="https://api.zotero.org/users/436/collections?limit=5&content=json"/> | |
<link rel="next" type="application/atom+xml" href="https://api.zotero.org/users/436/collections?limit=5&content=json&start=5"/> | |
<link rel="last" type="application/atom+xml" href="https://api.zotero.org/users/436/collections?limit=5&content=json&start=35"/> | |
<link rel="alternate" type="text/html" href="http://zotero.org/users/436/collections?limit=5"/> | |
<zapi:totalResults>38</zapi:totalResults> |
#!/usr/bin/env python | |
def fibo(): | |
""" | |
yield the Fibonacci sequence | |
""" | |
a, b = 0, 1 | |
while True: | |
yield a | |
a, b = b, a + b |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Assume a target number and an actual number | |
Assume a range of commission payments based upon the percentage achieved | |
What is the amount of commission due? | |
""" | |
from decimal import Decimal |
If you have installed MacGPG2 via the package installer, several other | |
checks in this script will turn up problems, such as stray .dylibs in | |
/usr/local and permissions issues with share and man in /usr/local/. | |
Some "config" scripts were found in your path, but not in system or Homebrew folders. | |
`./configure` scripts often look for *-config scripts to determine if software packages | |
are installed, and what additional flags to use when compiling and linking. | |
Having additional scripts in your path can confuse software installed via Homebrew if |
[u'<div class="csl-entry">Sontag, S. \u201cGodot Comes to Sarajevo.\u201d <i>The New York Review of Books</i> 21 (1993) : 53\u201359. Print.</div>', | |
u'<div class="csl-entry">McIntyre, T. J. \u201cCopyright in Custom Code: Who Owns Commissioned Software?\u201d <i>Journal of Intellectual Property Law & Practice</i> (2007) : n. pag. Print.</div>', | |
u'<div class="csl-entry">Badiou, A. \u201c\u2018We Need a Popular Discipline\u2019: Contemporary Politics and the Crisis of the Negative.\u201d <i>Critical Inquiry</i> 34.4 (2008) : n. pag. Print.</div>'] |
#!/usr/bin/env python | |
def wrap(f): | |
def enc(*args): | |
for item in args: | |
f(item) | |
return enc | |
@wrap |
#!/bin/bash -e | |
# opinionated Flask bootstrap script | |
# assumes you'll be using MySQL/PG, Fabric, Webassets, WTForms and Blueprints | |
# creates a virtualenv and an Alembic migrations system | |
# The script will halt on any error, and remove the project dir, if it created one | |
# accepts a single argument: a new directory name under which to create the project | |
# check that Python is installed | |
type python >/dev/null 2>&1 || { echo >&2 "Python doesn't appear to be installed. Aborting."; exit 1; } |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from bs4 import BeautifulSoup | |
import requests | |
gh_url = "https://github.com/blog/%s" | |
titles = [] | |
# all posts since the 19th of May 2011 | |
for r in xrange(858, 1395): |
% Biblatex-MLA setup for Biblatex-MLA 0.9.5 | |
\usepackage[ | |
style=mla, | |
autocite=footnote, | |
backref=true, | |
hyperref=true, | |
backend=biber]{biblatex} | |
% Compatibility fixes for Biblatex 2.0 and Biblatex-MLA | |
\DeclareAutoCiteCommand{footnote}[f]{\footcite}{\footcites} | |
\providecommand\biburldatelong{} |