View extension.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
{} |
View extension.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
, |
View release-schema.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
{} |
View tz_identifiers_to_rails_identifiers.rb
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", |
View flaticon_to_iso2.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 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 |
View opml_generator.rb
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/) |
View unpack_and_beautify.h
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, |
View fix_invalid_json.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
#!/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 |
View pelican_check_export.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
# Generates: | |
# https://docs.google.com/document/d/1l5SL1hUR9n8IDYVLSYsU85hdB3L_u2e3iD-txQPc0zU/edit | |
# https://docs.google.com/spreadsheets/d/1WPPOSf7xM9LR3VlTGx7wyzc8q_5xQ3HyMoB8eaEWHDM/edit#gid=0 | |
# Gist: https://gist.github.com/jpmckinney/f3bdbb62620a9974ba1ff254392f6b6d | |
# GitHub: https://github.com/open-contracting/pelican/issues/63 | |
# CRM: https://crm.open-contracting.org/issues/5908 | |
import csv | |
import json |
View convert_recommonmark_to_myst.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 json | |
import os | |
import re | |
import sys | |
from textwrap import dedent | |
tables_replacements = { | |
'```eval_rst': '', | |
'```': '', | |
} |
NewerOlder