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 |
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 ' ' ':') |
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)); |
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 |
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/. |
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 |
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) |