Skip to content

Instantly share code, notes, and snippets.

@SomeKittens
SomeKittens / comcast.js
Created Jul 3, 2016
Comcast injection code
View comcast.js
! function(t, e, i) {
function o(t) {
return t
}
function n(t) {
var e, i = [],
o = function() {
var o = arguments,
n = o.length;
View gist:0ad8bdeb0a9cb5cde5ef67afb1c38bbd

I'm trying to find geospatial data, specifically terrain/topography/landcover like urban, forest, desert, tundra, ocean, river, etc...

The first question I had asked on this site (see below) had an answer which stated that I'd need to interrogate the layers in order to generate the dataset I'd like to get. I have some idea of what the user is talking about now, but it implies that in order for me to get this data, I will need to learn some sort of GIS application, load up some raster/vector data, and then get the information on a per lat/long/elevation basis.

Some related questions I've asked on stack exchange while trying to figure out how to get this data include http://gis.stackexchange.com/questions/200767/geographic-characteristics-by-lat-long and http://opendata.stackexchange.com/questions/9145/geospatial-data-at-a-particular-lat-long. I've also skimmed through the sites listed here: http://opendata.stackexchange.com/questions/7303/collection-of-large-geospatial-datasets and it seems to me that mos

@SomeKittens
SomeKittens / Notes.md
Last active Apr 12, 2016
Notes from "Debugging Node in Production
View Notes.md
@SomeKittens
SomeKittens / atldr.md
Last active Jan 27, 2016
npm progress bar test
View atldr.md

First run (no progress bar): npm install 26.31s user 6.47s system 26% cpu 2:01.97 total

Second run (progress bar): npm install 29.98s user 5.68s system 36% cpu 1:36.98 total

Stats:

http://i.imgur.com/wYPgGcK.png

@SomeKittens
SomeKittens / elastic.sh
Created Jan 9, 2014
ElasticSearch script install
View elastic.sh
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.9.zip
unzip elasticsearch-0.90.9.zip -d /usr/local/elasticsearch
cd /usr/local/elasticsearch/elasticsearch-0.90.9
bin/plugin -install elasticsearch/elasticsearch-cloud-aws/1.16.0
bin/plugin -install mobz/elasticsearch-head
mv * /usr/local/elasticsearch/
cd ..
rm -R elasticsearch-0.90.9
cd config
echo '' >> elasticsearch.yml
View lintMe.js
function() {
var myVariable = 'test 123';
console.log(myVaraible); // Uh oh! There's a typo here.
// JSLint tells us `'myVaraible' was used before it was defined`, catching the error before it's run
};
@SomeKittens
SomeKittens / cookies.js
Created Oct 25, 2013
Logs in and dumps cookies
View cookies.js
var Browser = require('zombie');
var url = 'http://stackoverflow.com/users/login?returnurl=http%3a%2f%2fchat.stackoverflow.com%2frooms%2f17%2fjavascript';
browser = new Browser();
browser.visit(url, function(e) {
browser.wait(function(window) {
return window.document.querySelector('#openid_highlight');
}, function() {
@SomeKittens
SomeKittens / login.js
Created Oct 25, 2013
Zombie.js login to StackOverflow
View login.js
var Browser = require('zombie');
var url = 'http://stackoverflow.com/users/login?returnurl=http%3a%2f%2fchat.stackoverflow.com%2frooms%2f17%2fjavascript';
//url = 'http://chat.stackoverflow.com/rooms/17/javascript';
browser = new Browser({maxWait: 500});
//console.log(browser.cookies);
//browser.cookies(url).set('session', '123');
browser.visit(url, function(e) {
if (e) return console.error(e);
//console.log(browser);
@SomeKittens
SomeKittens / troll.js
Created Oct 21, 2013
Slowly removes the page
View troll.js
document.addEventListener('click', function() {
window.setTimeout(function() {
var all = document.querySelectorAll('*');
all[Math.floor(Math.random() * all.length)].style.display = 'none';
}, Math.floor(Math.random() * 5000));
});