View 0_reuse_code.js
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
View jars2classpath.sh
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
export CLASSPATH=$(find `pwd` -name '*.jar' | xargs echo | tr ' ' ':') |
View png_colors.js
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
// usage: node png_colors.js | sort | uniq | |
// | |
// ignores alpha | |
var PNG = require('png-js'); | |
var myimage = PNG.load('my_image.png'); | |
myimage.decodePixels(function (pixels) { | |
for( var ii = 0; ii < pixels.length; ii = ii + 4){ | |
console.log( pixels.readUInt32BE(ii).toString(16).substring(0,6)); |
View swagger.yaml
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
swagger: '2.0' | |
info: | |
version: 0.0.1 | |
title: Myriad API | |
description: | | |
Myriad API description | |
host: localhost:8192 | |
basePath: /api | |
schemes: | |
- http |
View build-and-deploy.sh
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 | |
./gradlew build | |
./gradlew capsuleExecutor | |
sudo -u hduser cp /vagrant/build/libs/* /usr/local/hadoop/share/hadoop/yarn/lib/ | |
sudo -u hduser cp /vagrant/build/libs/myriad-executor-0.0.1.jar /usr/local/libexec/mesos | |
sudo -u hduser cp /vagrant/build/resources/main/myriad-config-default.yml /usr/local/hadoop/etc/hadoop/. |
View ECEF2LLA.java
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
/* | |
* | |
* ECEF - Earth Centered Earth Fixed | |
* | |
* LLA - Lat Lon Alt | |
* | |
* ported from matlab code at | |
* https://gist.github.com/1536054 | |
* and | |
* https://gist.github.com/1536056 |
View ECEF2LLA.matlab
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
% LLA2ECEF - convert latitude, longitude, and altitude to | |
% earth-centered, earth-fixed (ECEF) cartesian | |
% | |
% USAGE: | |
% [x,y,z] = lla2ecef(lat,lon,alt) | |
% | |
% x = ECEF X-coordinate (m) | |
% y = ECEF Y-coordinate (m) | |
% z = ECEF Z-coordinate (m) | |
% lat = geodetic latitude (radians) |