Skip to content

Instantly share code, notes, and snippets.

@danbjoseph
danbjoseph / conditionalGalleryResize.jsx
Last active August 29, 2015 14:20
Photoshop script for thumbnail and small preview img
var inFolder = new Folder("~/Desktop/forUpload");
var fileList = inFolder.getFiles(/\.(jpg|tif|psd|bmp|gif|png|pdf|)$/i);
for(var a = 0 ;a < fileList.length; a++)
{
@danbjoseph
danbjoseph / plugins.md
Last active December 24, 2016 17:34
plugins to remember

QGIS

  • color ramp manager
  • Quick Map Services

JOSM

  • building tools
  • utilsplugin2
    • replace geometry (Ctrl+Shift+G)
  • todo list (work systematically through a selection)
  • download along plugin (Alt+Shift+D)
@danbjoseph
danbjoseph / omk-notes.md
Last active August 27, 2019 12:24
notes on OpenMapKit (OMK), specifically mbtiles and osm files

#OpenMapKit (OMK) https://github.com/AmericanRedCross/OpenMapKit/wiki

  • install node
    • install the following packages tl, mbtiles, tilelive-http
    • npm install -g tl @mapbox/mbtiles tilelive-http
  • go to http://bboxfinder.com/ and box your area
    • should return your cooridinates in the following order: lng-min, lat-min, lng-max, lat-max
  • open terminal/command line and cd to your project folder and run the following:
  • tl copy -z 13 -Z 20 -b '{{lng-min}} {{lat-min}} {{lng-max}} {{lat-max}}' 'http://a.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png' mbtiles://./{{myFileName}}.mbtiles
### Disaster types
--- Biological ---
Epidemic
Grasshoppers
Locusts
Animal Attack
Meteorite
--- Geophysical ---
Earthquake
@danbjoseph
danbjoseph / illustrator-crash-course-topics.md
Created January 22, 2016 02:04
emily's notes on topics to cover when teaching illustrator
  • Overview of Adobe products and stuff
    • When to use what program
    • What’s a vector graphic? What do the formats mean, etc.
    • Show past fave maps, talk about style guide, the GIS team styles, etc. -Resources: give them fonts, swatches, and some samples to play around on
  • Adobe Illustrator interface -Layout -Layers! Turning them on/off, locking, stacking, hide things don’t delete them, best practices for setting up map layers -Border vs. Inside – how the color thingy works -Basic tools
(function(exports){
crossfilter.version = "1.3.13";
function crossfilter_identity(d) {
return d;
}
crossfilter.permute = permute;
function permute(array, index) {
for (var i = 0, n = index.length, copy = new Array(n); i < n; ++i) {
copy[i] = array[index[i]];
@danbjoseph
danbjoseph / lesson3.md
Last active June 7, 2016 20:19
psu geog585 lesson 3

to batch process the shapefiles save the following

#!/bin/bash
cd /Users/danbjoseph/Documents/PSU/psu_geog585/lesson3/PhiladelphiaBaseLayers/
for f in *.shp
  do ogr2ogr -skipfailures -clipsrc /Users/.../PhiladelphiaBaseLayers/clipFeature/city_limits.shp /Users/.../PhiladelphiaBaseLayers/clipped/$f /Users/.../PhiladelphiaBaseLayers/$f
  ogr2ogr -s_srs EPSG:4326 -t_srs EPSG:3857 /Users/.../PhiladelphiaBaseLayers/clippedAndProjected/$f /Users/.../PhiladelphiaBaseLayers/clipped/$f
  touch /Users/.../PhiladelphiaBaseLayers/clippedAndProjected/${f%.*}.qpj
  echo 'PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUT
@danbjoseph
danbjoseph / .block
Last active January 25, 2019 21:11
Calendar heat map (vertical)
license: gpl-3.0
@danbjoseph
danbjoseph / .block
Last active July 9, 2016 21:00
Metro warp
We couldn’t find that file to show.