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 |
| # -*- coding: utf8 -*- | |
| import json | |
| import urllib2 | |
| import urllib | |
| import sys | |
| import os | |
| from argparse import ArgumentParser | |
| from collections import defaultdict |
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 |
| curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["node", "active"], true]' | |
| curl -sf 'http://localhost:8080/v3/facts' | |
| curl -sf 'http://localhost:8080/v3/nodes' | |
| curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["fact", "kernel"], "Linux"]' | |
| curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["fa, "operatingsystem"], "windows"]' |
I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6
apt-get update && apt-get install gdb
| <?php | |
| // enqueue these scripts and styles before admin_head | |
| wp_enqueue_script( 'jquery-ui-dialog' ); // jquery and jquery-ui should be dependencies, didn't check though... | |
| wp_enqueue_style( 'wp-jquery-ui-dialog' ); | |
| ?> | |
| <!-- The modal / dialog box, hidden somewhere near the footer --> | |
| <div id="my-dialog" class="hidden" style="max-width:800px"> | |
| <h3>Dialog content</h3> | |
| <p>This is some terribly exciting content inside this dialog. Don't you agree?</p> |
| #!/bin/sh | |
| rm -rf /var/lib/cloud/sem/* /var/lib/cloud/instance /var/lib/cloud/instances/* | |
| cloud-init start 2>&1 > /dev/null | |
| cloud-init-cfg all final |