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
require 'json' | |
require 'jwt' | |
require 'net/http' | |
APP_ID = ARGV[0] | |
KEY_ID = ARGV[1] | |
ISSUER_ID = ARGV[2] | |
AUTH_KEY_PATH = ARGV[3] | |
FETCH_LOCALES = ARGV.length == 4 | |
VERSION = ARGV[4] |
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
let headerHeight = 52; | |
let gap = 24; | |
let scrollBehavior = "instant"; | |
document.addEventListener('keydown', jkOnKeyDown); | |
document.addEventListener('keyup', jkOnKeyUp); | |
function jkOnKeyDown(e) { | |
if (e.keyCode == 72) turn('Left'); // h | |
if (e.keyCode == 74) move(1); // j | |
if (e.keyCode == 75) move(-1); // k |
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
require 'rubygems' | |
require 'rmagick' | |
ICON_W = 32 | |
ICON_H = 32 | |
SCALE = 18 | |
Y = 32 * SCALE | |
GAP = (2520 - ICON_W * SCALE * 4) / 3 | |
W = ICON_W * SCALE |
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
require 'spreadsheet' | |
require 'json' | |
Spreadsheet.client_encoding = 'UTF-8' | |
begin | |
book = Spreadsheet.open $*[0] | |
rescue | |
STDERR.puts "usage: ruby x2j.rb excel_file" | |
exit false |
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
<?php | |
$html = file_get_contents($argv[1]); | |
foreach(preg_split("/(\r?\n)/", $html) as $line) { | |
preg_match_all("/<a href=\"([^<>]+darami[^<>]+\\.jpg)/", $line, $matches); | |
foreach ($matches[1] as $link) { | |
if (strlen($link) > 0) { | |
print "curl -O $link\n"; | |
} | |
} | |
} |