This gist goes through the motions to see if I can get a basic block working with gists and all that.
This file contains hidden or 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, os | |
# Put filenames here; this script assumes these files are in the same dir as the script | |
FILENAME_1 = "2.json" | |
FILENAME_2 = "3.json" | |
def ordered(obj): | |
if isinstance(obj, dict): | |
return sorted((k, ordered(v)) for k, v in obj.items()) |
This file contains hidden or 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
fn main() { | |
type One = Succ<Zero>; | |
type Two = Succ<One>; | |
type Three = Succ<Two>; | |
type Five = <Two as Add<Three>>::Result; | |
type Four = <One as Sub<Five>>::Result; | |
println!("Zero: {}", Zero::fmt()); | |
println!("One: {}", One::fmt()); | |
println!("Two: {}", Two::fmt()); |
This file contains hidden or 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
function display_obj(obj, category) { | |
var url = "/" + category + "/" + obj.val(); | |
return new Promise(function(resolve, reject) { | |
$.get(url, function(resp) { | |
var rows = ""; | |
for (var key in resp) { | |
console.log("Generating pairs[" + key + "]: " + resp[key]); | |
rows += generate_row(key, resp[key]); | |
} |
This file contains hidden or 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/sh | |
# Usage: `git url` or `git url <commitish>` | |
# | |
# * copies the commit's github url to your clipboard | |
# * prints out the log message | |
# * opens the bugzilla page if it found a bug number | |
# | |
# Assumes that the canonical remote is named upstream. | |
# Works on Linux |