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
#!/bin/bash | |
open /Applications/Google\ Chrome\ Canary.app/ --args --disable-web-security |
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/env bash | |
# SOURCE: https://eligiblestore.com/blog/2017/05/02/how-to-install-mosh-on-centos/ | |
# ensure running as root | |
if [[ "$(id -u)" != "0" ]]; then | |
exec sudo "$0" "$@" | |
fi | |
# install mosh | |
yum install -y epel-release |
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
@app.after_request | |
def save_response(r): | |
if flask.request.method == 'POST': | |
return r | |
if flask.request.endpoint == 'static': | |
return r | |
history = flask.session.get('history', []) |
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
# Courtesy of: https://stackoverflow.com/a/11974399 | |
{%- for item in items %} | |
[ | |
"{{item}}"{{ "," if not loop.last }} | |
] | |
{%- endfor %} |
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
/* Basic specificity cheatsheet */ | |
h1 { | |
/* Native elements have a weight of 0001. */ | |
} | |
::after { | |
/* Pseudo-elements have a weight of 0001. */ | |
} |
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
# Format Specification Mini-Language (Quick Reference) | |
import datetime | |
integer = 5 | |
negative_integer = -5 | |
decimal = 6.9 | |
negative_decimal = -6.9 | |
string = 'hi' | |
cost_float = 1299.99 | |
cost_integer = 150000 |