-
Install JDK 1.8
-
See if
JAVA_HOME
ENV variable is set to 1.8. If not, add this line in your~/.bashrc
:export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
And apply the changes to your session:
source ~/.bashrc
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$1 |
Install JDK 1.8
See if JAVA_HOME
ENV variable is set to 1.8. If not, add this line in your ~/.bashrc
:
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
And apply the changes to your session:
source ~/.bashrc
Prompted by:
Who wants to write a Mac-native OSM editor with me?
— Ian Dees (@iandees) February 9, 2014
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
And a few more key followups:
function getTileUrls(bounds, tileLayer, zoom) { | |
var min = map.project(bounds.getNorthWest(), zoom).divideBy(256).floor(), | |
max = map.project(bounds.getSouthEast(), zoom).divideBy(256).floor(), | |
urls = []; | |
for (var i = min.x; i <= max.x; i++) { | |
for (var j = min.y; j <= max.y; j++) { | |
var coords = new L.Point(i, j); | |
coords.z = zoom; |
#!/bin/bash | |
# This script is for exporting MBTiles directly to your Mapbox account. | |
# Requires a Mapbox account with sufficient storage for your tiles and | |
# authorized with your TileMill 0.10.0 install. | |
# Note that the maximum file transfer size is 5GB. | |
# Adapted from https://gist.github.com/springmeyer/7875415. | |
# Settings: edit these as needed | |
PROJECT_NAME="geography-class" # the folder name in your /project directory | |
OUTPUT_DIRECTORY="~/Documents/MapBox/export/" |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns on recent CPU
L2 cache reference ........................... 7 ns 14x L1 cache
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs 4X memory
hexer is cool. It's a new project by Howard Butler that makes hexagon binned files out of point files.
This worked on my system (OSX 10.9, git
via homebrew
)
git clone https://github.com/hobu/hexer.git
# !/bin/bash | |
# make sure homebrew is up-to-date and install some stuff | |
brew update | |
brew install postgres || brew upgrade postgres | |
brew install postgis || brew upgrade postgis | |
# if you dont have brew on your path yet | |
echo "export PATH=/usr/local/bin:$PATH" >> ~/.bash_profile | |
source ~/.bash_profile |
#!/usr/bin/env python | |
''' | |
This code is adapted from the consensus best practice python Twitter feed | |
consumer that's been floating around for a while now on StackOverflow etc. | |
My only addition to speak of is TenminWriter. (A "tenmin" is ten minutes | |
worth of stream. It's just a convenient chunk; you might want to make it | |
shorter or longer.) | |
THERE ARE BUGS HERE. THIS IS BARELY TESTED. DO NOT TRUST IT. |