- Passport (+I-797B)
- Hoodie
- Bluetooth headphones
- Surface
- 3DS/Vita (+games for 3DS)
- Nexus 9
- Kindle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: coffeefinger | |
platform: ESP32 | |
board: m5stick-c | |
# Enable logging | |
logger: | |
# Enable Home Assistant API | |
api: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import builtins | |
class FakeBaseException(BaseException): | |
pass | |
builtins.BaseException = FakeBaseException | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
F12::ToggleTerminal() | |
ShowAndPositionTerminal() | |
{ | |
WinShow ahk_class CASCADIA_HOSTING_WINDOW_CLASS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Benchmark results: | |
Date: 2016/03/20 | |
Version: asgi_redis 0.8.3 / daphne master / channels master / cpython 2.7.11 | |
Environment: AWS, 3x m3.large (1 daphne, 1 worker, 1 redis) | |
Source: 1x m3.medium, different AZ, ab for HTTP, channels benchmarker for WS | |
HTTP GET, Django View (concurrency 10, 10,000 total) | |
Failures: 0.0% | |
Rate: 160 req/s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
import subprocess | |
import random | |
terms = [t.lower() for t in sys.argv[1:]] | |
if not terms: | |
print "No search terms supplied" | |
sys.exit(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Main Nginx router | |
www-router: | |
image: andrewgodwin/www-router | |
environment: | |
www.aeracode.org: aeracode-varnish | |
aeracode.org: redirect:www.aeracode.org | |
www.codingponies.com: codingponies | |
codingponies.com: redirect:www.codingponies.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This presents an example of rendering templates in the database. | |
-- DO NOT DO THIS! It's a terrible idea, and just example for my talk | |
-- which you can see at https://speakerdeck.com/andrewgodwin/dubious-database-design | |
CREATE EXTENSION plpythonu; | |
-- Table to store template HTML by name | |
CREATE TABLE templates ( | |
"name" text PRIMARY KEY, | |
"template" text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cProfile, pstats, StringIO | |
pr = cProfile.Profile() | |
pr.enable() | |
# ... do something ... | |
pr.disable() | |
s = StringIO.StringIO() | |
sortby = 'cumulative' | |
ps = pstats.Stats(pr, stream=s).sort_stats(sortby) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import deque | |
def dependency_sort(initial, dependency_func): | |
""" | |
Generic dependency sorting algorithm; supply an initial list of IDs as | |
"initial", and a callable that takes an ID and returns a list of IDs as | |
"dependencies". | |
The resultant list is in order from leaf nodes (no dependencies) to stems. | |
""" |
NewerOlder