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
# blog post: http://blog.slashpoundbang.com/post/2613268281/changing-from-tz-database-identifiers-to-rails-friendly | |
{ | |
"Australia/Adelaide" => "Adelaide", | |
"Australia/Broken_Hill" => "Adelaide", | |
"America/Anchorage" => "Alaska", | |
"America/Juneau" => "Alaska", | |
"America/Nome" => "Alaska", | |
"America/Yakutat" => "Alaska", | |
"Pacific/Gambier" => "Alaska", | |
"Asia/Almaty" => "Almaty", |
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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"title": "Codelist schema", | |
"description": "Schema for codelist CSV files.", | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Row" | |
}, | |
"definitions": { | |
"Row": { |
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
.xbox .abxy,.xbox .arrows,.xbox .bumpers,.xbox .button,.xbox .dpad,.xbox .face,.xbox .quadrant,.xbox .stick,.xbox .sticks,.xbox .triggers{position:absolute}.controller.xbox{background:url(https://imgur.com/eWlI7VE.png);height:630px;width:750px}.xbox.white{background:url(https://imgur.com/dC9NkhO.png)}.xbox.disconnected{background:url(https://imgur.com/1i0fvvM.png)}.xbox.disconnected div{display:none}.xbox .triggers{width:427px;height:121px;left:160px;top:-8px}.xbox .trigger{width:88px;height:121px;background:url(https://imgur.com/yB8ABy5.png);opacity:0}.xbox .trigger.left{float:left;background-position:0 0}.xbox .trigger.right{float:right;left:8px;transform:rotateY(180deg)}.xbox .bumper{width:170px;height:61px;background:url(https://imgur.com/lr9lHUc.png);opacity:0}.xbox .bumpers{width:528px;height:61px;left:110px;top:113px}.xbox .back.pressed,.xbox .bumper.pressed,.xbox .face.pressed,.xbox .start.pressed{opacity:1}.xbox .back,.xbox .bumper.left{float:left}.xbox .bumper.right{float:right;-webkit-transform:rot |
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 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 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 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 os | |
import sys | |
from hdx.location.country import Country | |
# https://www.flaticon.com/packs/rectangular-country-simple-flags?word=flags | |
FLAG_PATH = 'path/to/flaticon/folder' | |
excluded = { | |
# Non-ISO states with limited recognition |
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
# blog post: http://blog.slashpoundbang.com/post/3385815540/how-to-generate-an-opml-file-with-ruby | |
require 'open-uri' | |
require 'builder' | |
require 'truffle-hog' | |
require 'nokogiri' | |
# CHANGE ME | |
urls = %w(http://example.com/ http://example.org/) |
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
// blog post: http://blog.slashpoundbang.com/post/2488598258/running-javascript-from-the-command-line-with-v8 | |
const char unpack_code[] = { | |
0x2f,0x2f,0x20,0x62,0x6c,0x6f,0x67,0x20,0x70,0x6f,0x73,0x74,0x3a,0x20,0x68,0x74, | |
0x74,0x70,0x3a,0x2f,0x2f,0x62,0x6c,0x6f,0x67,0x2e,0x73,0x6c,0x61,0x73,0x68,0x70, | |
0x6f,0x75,0x6e,0x64,0x62,0x61,0x6e,0x67,0x2e,0x63,0x6f,0x6d,0x2f,0x70,0x6f,0x73, | |
0x74,0x2f,0x32,0x34,0x32,0x38,0x35,0x35,0x37,0x30,0x30,0x37,0x2f,0x75,0x6e,0x70, | |
0x61,0x63,0x6b,0x2d,0x61,0x6e,0x64,0x2d,0x62,0x65,0x61,0x75,0x74,0x69,0x66,0x79, | |
0x2d,0x6a,0x61,0x76,0x61,0x73,0x63,0x72,0x69,0x70,0x74,0x0a,0x0a,0x2f,0x2f,0x20, | |
0x41,0x73,0x73,0x75,0x6d,0x65,0x73,0x20,0x6a,0x73,0x5f,0x62,0x65,0x61,0x75,0x74, |
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 python | |
import json | |
import sys | |
def run(filename): | |
with open(filename) as f: | |
s = f.read() | |
# This code will re-read the file from the beginning after fixing each error, which is slow. A better solution |
NewerOlder