When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}
#!/bin/bash | |
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine | |
# Used to provide DDNS service for my home | |
# Needs the DNS record pre-creating on Cloudflare | |
# Proxy - uncomment and provide details if using a proxy | |
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport> | |
# Cloudflare zone is the zone which holds the record |
<div class="screen"> | |
<p>It was this howling and firing of the guns at Ripley and St. George's Hill that we had heard at Upper Halliford. The Ripley gunners, unseasoned artillery volunteers who ought never to have been placed in such a position, fired one wild, premature, ineffectual volley, and bolted on horse and foot through the deserted village, while the Martian, without using his Heat-Ray, walked serenely over their guns, stepped gingerly among them, passed in front of them, and so came unexpectedly upon the guns in Painshill Park, which he destroyed.</p> | |
<p style="text-align:right">H. G. Wells - The War of the Worlds, Chapter 15</p> | |
</div> |
TL;DR
Install Postgres 9.6, and then:
sudo pg_dropcluster 9.6 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main
Set db path for pg_upgradecluster:
from django import forms | |
from django.contrib.postgres.fields import ArrayField | |
class ChoiceArrayField(ArrayField): | |
""" | |
A field that allows us to store an array of choices. | |
Uses Django 1.9's postgres ArrayField | |
and a MultipleChoiceField for its formfield. |
Byobu is a suite of enhancements to tmux, as a command line | |
tool providing live system status, dynamic window management, | |
and some convenient keybindings: | |
F1 * Used by X11 * | |
Shift-F1 Display this help | |
F2 Create a new window | |
Shift-F2 Create a horizontal split | |
Ctrl-F2 Create a vertical split | |
Ctrl-Shift-F2 Create a new session |
KEYBINDINGS | |
byobu keybindings can be user defined in /usr/share/byobu/keybindings/ (or within .screenrc if byobu-export was used). The common key bindings | |
are: | |
F2 - Create a new window | |
F3 - Move to previous window | |
F4 - Move to next window |
''' | |
Add CORS headers for tastypie APIs | |
Usage: | |
class MyModelResource(CORSModelResource): | |
... | |
class MyResource(CORSResource): | |
... | |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
/** | |
* Open all external links in a new window | |
*/ | |
jQuery(document).ready(function($) { | |
$('a') | |
.filter('[href^="http"], [href^="//"]') | |
.not('[href*="' + window.location.host + '"]') | |
.attr('rel', 'noopener noreferrer') | |
.attr('target', '_blank'); | |
}); |