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 |
| import urllib2 | |
| import threading | |
| from Queue import Queue | |
| import sys, os, re | |
| class ThreadedDownload(object): | |
| REGEX = { | |
| 'hostname_strip':re.compile('.*\..*?/', re.I) | |
| } |
| # -------------------------------------------------------------------- | |
| # An implementation of the "Growing Tree" algorithm. This one is | |
| # notable for it's ability to become nearly identical to Prim's | |
| # algorithm, or the Recursive Backtracking algorithm, depending on | |
| # how the cells are removed from the list that aggregates as the | |
| # algorithm runs. | |
| # | |
| # This script allows you to play with those settings by specifying | |
| # the mode after the width and height parameters, as "random" (pull | |
| # the cell from list at random), "newest" (pull the newest cell), |
| -- phpMyAdmin SQL Dump | |
| -- version 3.5.8.1 | |
| -- http://www.phpmyadmin.net | |
| -- | |
| -- Host: 127.0.0.1 | |
| -- Generation Time: Jun 14, 2013 at 08:39 AM | |
| -- Server version: 5.6.11-log | |
| -- PHP Version: 5.4.14 | |
| SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; |
| #!/bin/bash | |
| # | |
| # Config | |
| # | |
| # if more than the threshold, the IP will be banned | |
| THRESHOLD=100 | |
| # search this many recent lines of the access log |
| """ | |
| Read a CSV file and save it as a JSON file. Based on | |
| http://stackoverflow.com/questions/12951337/csv-file-to-json-file-in-python | |
| The `data.csv`, here is a sample file from: | |
| http://www.ferc.gov/docs-filing/eqr/soft-tools/sample-csv/contract.txt | |
| """ | |
| import csv | |
| import json |
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 |
About:
| """ | |
| Folding paper in half 50 times is 3/4 of the distance from earth to sun | |
| From: | |
| http://www.quora.com/What-are-some-of-the-most-mind-blowing-facts#answer_526501 | |
| Thickness of a sheet of paper: 0.1 mm (~0.004 inches) | |
| """ |
| #X-------------------- minute (0 - 59) | |
| #--X------------------ hour (0 - 23) | |
| #-----X--------------- day of month (1 -31) | |
| #-------X------------- month (1-12) | |
| #----------X---------- day of week (0-7) (sunday = 0 or 7) |