Loosely ordered with the commands used most towards the top. Sublime also offer full documentation.
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| Ctrl+⇧+↩ | insert line before |
| Ctrl+⇧+↑ | move line (or selection) up |
| #!/usr/bin/env python | |
| # | |
| # Converts any integer into a base [BASE] number. I have chosen 62 | |
| # as it is meant to represent the integers using all the alphanumeric | |
| # characters, [no special characters] = {0..9}, {A..Z}, {a..z} | |
| # | |
| # I plan on using this to shorten the representation of possibly long ids, | |
| # a la url shortenters | |
| # |
| import logging | |
| import math | |
| import mimetypes | |
| from multiprocessing import Pool | |
| import os | |
| from boto.s3.connection import S3Connection | |
| from filechunkio import FileChunkIO |
Loosely ordered with the commands used most towards the top. Sublime also offer full documentation.
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| Ctrl+⇧+↩ | insert line before |
| Ctrl+⇧+↑ | move line (or selection) up |
| #-*- coding: utf-8 -*- | |
| import urllib, re, os, argparse | |
| RE_NEXT_URL = ur'<a href=\"(?!javascript\:)([^\"]*?)">下一页<\/a>' | |
| RE_PICTURE = ur'<p\s+(?:align=\"center\")>\s*<img.*?src=\"(.*?)\".*?\/?>' | |
| RE_ARCTITLE = ur'var arctitle=\'(.*?)\';' | |
| def get_html(url): | |
| try: | |
| return urllib.urlopen(url).read().decode('gbk') |
| def r(a): | |
| i=a.find('0') | |
| if i<0:print a | |
| [m in[(i-j)%9*(i/9^j/9)*(i/27^j/27|i%9/3^j%9/3)or a[j]for | |
| j in range(81)]or r(a[:i]+m+a[i+1:])for m in`14**7*9`] | |
| r(raw_input()) |
| # -*- coding: utf-8 -*- | |
| ''' | |
| Steganogrphy in Python | |
| Copyright 2013 Josiah Carlson | |
| Released under the GNU LGPL v2.1 license | |
| What, how, why, etc, are discussed: | |
| http://www.dr-josiah.com/2013/05/steganography-in-python.html |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <opml version="1.0"> | |
| <head> | |
| <title>Stephen subscriptions in feedly Cloud</title> | |
| </head> | |
| <body> | |
| <outline text="Companies" title="Companies"> | |
| <outline type="rss" text="Trello" title="Trello" xmlUrl="https://trello.engineering/feed.xml" htmlUrl="http://tech.trello.com/"/> | |
| <outline type="rss" text="IMVU" title="IMVU" xmlUrl="http://engineering.imvu.com/feed/" htmlUrl="https://engineering.imvu.com"/> |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
| #!/bin/bash | |
| ### | |
| ### my-script — does one thing well | |
| ### | |
| ### Usage: | |
| ### my-script <input> <output> | |
| ### | |
| ### Options: | |
| ### <input> Input file to read. | |
| ### <output> Output file to write. Use '-' for stdout. |