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
class DepthmapLoader { | |
/** | |
* load 16-bit PNG depthmap from URL and return | |
* the normalized bitmap as a Canvas ImageData | |
* | |
* @param {string} url - URL of PNG image | |
* @return {Promise} -> {width,height,imageData} | |
*/ | |
fetch(url) { | |
let pngtoy = new PngToy(); |
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
/* | |
* encode image sequence into WEBM video | |
*/ | |
import {exec} from 'child-process-promise'; | |
import format from 'string-template'; | |
import fsAsync from 'file-async'; | |
import shell from 'shelljs'; | |
import path from 'path'; | |
import os from 'os'; |
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
Verifying my Blockstack ID is secured with the address 1Bi1NDUmdb4nXzcWW1Xm9DXxKvuAFqnJDf https://explorer.blockstack.org/address/1Bi1NDUmdb4nXzcWW1Xm9DXxKvuAFqnJDf |
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
var ProgressBar = require('../index.js'); | |
var bars = []; | |
var total = 1000; | |
var left = total; | |
var count = 0; | |
var simul = 5; | |
var timer = setInterval(function () { |
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/perl | |
# | |
# myip - get the IP address of this host | |
# | |
# Usage: myip [-6] [prefix] | |
# myip -p | |
# | |
# -6 - get IPv6 address instead of IPv4 | |
# -p - get public IPv4 address from ISP | |
# prefix - match the first NIC having partial |
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/perl | |
# | |
# chip - add/change/delete IP entry in "/etc/hosts" | |
# | |
# Usage: add/change: chip [-q] {host_name} {ip_address} | |
# delete: chip {host_name} - | |
# | |
# -q: quiet - don't validate if Data::Validate::IP | |
# module cannot be found | |
# |
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 bash | |
# | |
# show S3 bucket size/count | |
# usage: bsize <bucket> | |
# | |
# author: Erhhung Yuan <erhhung@alum.mit.edu> | |
bucket=$1 | |
if [ -z "$bucket" ]; then |
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 bash | |
# | |
# empty entire S3 bucket | |
# usage: emptyb <bucket> | |
# | |
# author: Erhhung Yuan <erhhung@alum.mit.edu> | |
bucket=$1 | |
if [ -z "$bucket" ]; then |
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 node | |
// | |
// mkid - Make Object ID | |
// | |
// Usage: mkid [type|""] | |
// type: 3-char type | |
// | |
// Requires global NPM modules: | |
// | |
// uuid^8.3.2 |
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
/* | |
* 1. open https://sandcastle.cesium.com/ | |
* 2. paste this code into the editor | |
* 3. open debugger and disable cache | |
* 4. click Run and wait for globe | |
* 5. click "Run camera sequence" | |
*/ | |
const URL = 'https://geotest{s}.ixstack.net/wms'; | |
const LAYER = 'gvdl:eethnhgcjbwvsrwaqfsgyvzzkw'; |
OlderNewer