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
/* eslint no-param-reassign: 0, no-console: 0 */ | |
// Get a list of all files with their sizes for each input directory | |
// NOTE: this is a simple implementation - for dir with millions of files this will run out of heap | |
// Run like: | |
// node list-files-and-sizes.js <dir> [<dir2 ...] | |
// This script: | |
// * recursively walks the file tree to get a list of files in order, |
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/ruby | |
require 'tk' | |
IMG_BORDER = 10 | |
MIN_IMG_SIZE = 100 | |
# use the filename entered on the command line, else prompt | |
def get_filename | |
return ARGV[0] if ARGV.length > 0 |
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
{ | |
"A": [[ "0", "0", "1", "0", "0" ], | |
[ "0", "1", "0", "1", "0" ], | |
[ "1", "0", "0", "0", "1" ], | |
[ "1", "1", "1", "1", "1" ], | |
[ "1", "0", "0", "0", "1" ], | |
[ "1", "0", "0", "0", "1" ], | |
[ "1", "0", "0", "0", "1" ]], | |
"B": [[ "1", "1", "1", "1", "0" ], | |
[ "1", "0", "0", "0", "1" ], |