When a key combination is displayed, the modifiers are written in the order presented here. For example, Control + Option + Shift + Command + Q would be written as ⌃⌥⇧⌘Q.
Sym | Key | Alt |
---|---|---|
⌃ | Control | |
⌥ | Option |
server { | |
listen 80; | |
server_name yournamehere.com; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name yournamehere.com; |
Picking the right architecture = Picking the right battles + Managing trade-offs
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
# Add this snippet to the top of your playbook. | |
# It will install python2 if missing (but checks first so no expensive repeated apt updates) | |
# gwillem@gmail.com | |
- hosts: all | |
gather_facts: False | |
tasks: | |
- name: install python 2 | |
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
# Example nginx + git HTTP Smart mode (git-http-backend) + HTTP Authentication + HTTPS redirect | |
# jeroen@massar.ch - http://jeroen.massar.ch | |
server { | |
listen 192.0.1.1:80; | |
listen [2001:db8::1]:80; | |
# Redirect all non-HTTPS traffic to the HTTPS variant | |
return 301 https://$host$request_uri; | |
} |
navigator.serviceWorker.getRegistrations().then(function (registrations) { | |
if (!registrations.length) { | |
console.log('No serviceWorker registrations found.') | |
return | |
} | |
for(let registration of registrations) { | |
registration.unregister().then(function (boolean) { | |
console.log( | |
(boolean ? 'Successfully unregistered' : 'Failed to unregister'), 'ServiceWorkerRegistration\n' + | |
(registration.installing ? ' .installing.scriptURL = ' + registration.installing.scriptURL + '\n' : '') + |