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 |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Leaflet</title> | |
| <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.css" /> | |
| <script src="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.js"></script> | |
| <script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script> | |
| <script src="http://matchingnotes.com/javascripts/leaflet-google.js"></script> | |
| </head> | |
| <body> |
| import re | |
| from django.utils.text import compress_string | |
| from django.utils.cache import patch_vary_headers | |
| from django import http | |
| try: | |
| import settings | |
| XS_SHARING_ALLOWED_ORIGINS = settings.XS_SHARING_ALLOWED_ORIGINS |
| # Compile h2o, a HTTP Server | |
| sudo apt-get install cmake libyaml-dev | |
| git clone https://github.com/kazuho/h2o.git | |
| git submodule update --init --recursive | |
| cmake . | |
| make h2o | |
| ./h2o -c examples/h2o.conf |
| //PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov anton.al.ivanov@gmail.com 2012 | |
| //UPDATE: This gist has been made into a Node.js module and now can be installed with "npm install js-crawler" | |
| //the Node.js version does not use Phantom.JS, but the API available to the client is similar to the present gist | |
| (function(host) { | |
| function Crawler() { | |
| this.visitedURLs = {}; | |
| }; | |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from Crypto.Cipher import AES | |
| import base64 | |
| import random | |
| import hashlib | |
| import os | |
| class AesCrypt256: |
| def sanitize(untrusted_html, additional_tags=None): | |
| """Strips potentially harmful tags and attributes from HTML, but preserves | |
| all tags in a whitelist. | |
| Passing the list additional_tags will add the specified tags to the whitelist. | |
| The sanitizer does NOT encode reserved characters into XML entities. It is up | |
| to the template code, if any, to take care of that. | |
| Based on the work of: |
| #!/bin/bash | |
| # Licence: GPLv3, MIT, BSD, Apache or whatever you prefer; FREE to use, modify, copy, no obligations | |
| # Description: Bash Script to Start the process with NOHUP and & - in background, pretend to be a Daemon | |
| # Author: Andrew Bikadorov | |
| # Script v1.5 | |
| # For debugging purposes uncomment next line | |
| #set -x |
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 |
| # Based on https://github.com/sass/libsass/wiki/Building-with-autotools | |
| # Install dependencies | |
| apt-get install automake libtool | |
| # Fetch sources | |
| git clone https://github.com/sass/libsass.git | |
| git clone https://github.com/sass/sassc.git libsass/sassc | |
| # Create configure script |