View iptableflip.sh
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
echo "Flipping tables! (╯°□°)╯︵ ┻━┻" | |
num_rules=3 | |
real=3 # exposed to the ELB as port 443 | |
test=4 # used to install test certs for domain verification | |
health=5 # used by the ELB healthcheck | |
blue_prefix=855 | |
green_prefix=866 |
View gist:33d9ff5d87e433410e77
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
{ | |
"title": "System Resources", | |
"services": { | |
"query": { | |
"list": { | |
"0": { | |
"query": "collectd_type:\"load\"", | |
"alias": "Load", | |
"color": "#70DBED", | |
"id": 0, |
View jsonalchemy.py
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 sqlalchemy | |
from sqlalchemy import * | |
from sqlalchemy.ext.mutable import Mutable | |
class JSONEncodedObj(types.TypeDecorator): | |
"""Represents an immutable structure as a json-encoded string.""" | |
impl = String | |
def process_bind_param(self, value, dialect): |
View access.lua
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
- certain endpoints are always blocked | |
if nginx_uri == "/_access_token" or nginx_uri == "/_me" then | |
ngx.exit(403) | |
end | |
-- import requirements | |
local cjson = require "cjson" | |
-- setup some app-level vars | |
local app_id = "APP_ID" |
View halo_json_request.json
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
{ | |
"_links": { | |
"self": { "href": "/foo" }, | |
}, | |
"_controls": { | |
"attack": { | |
"target": "/attacks", | |
"method": "POST", | |
"headers": { | |
"Content-Type": "application/json" |
View translate.py
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 babel import support | |
def man_gettext(string, domain, **variables): | |
translations = support.Translations.load(os.path.join(www.root_path, 'translations')) | |
return translations.dgettext(domain, string) % variables | |
def man_lazy_gettext(string, domain, **variables): | |
from speaklater import make_lazy_string | |
return make_lazy_string(man_gettext, string, domain, **variables) |
View MaxRectsBinPack.as
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
/* | |
Implements different bin packer algorithms that use the MAXRECTS data structure. | |
See http://clb.demon.fi/projects/even-more-rectangle-bin-packing | |
Author: Jukka Jylänki | |
- Original | |
Author: Claus Wahlers | |
- Ported to ActionScript3 |