Skip to content

Instantly share code, notes, and snippets.

View JamesKingdom's full-sized avatar
:shipit:

James Kingdom JamesKingdom

:shipit:
View GitHub Profile
@JamesKingdom
JamesKingdom / label.sh
Last active September 3, 2020 20:18
GitHub label creator
USER=username
PASS=password
ACC=account
REPO=repo
# Delete default labels
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ACC/$REPO/labels/bug"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ACC/$REPO/labels/duplicate"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ACC/$REPO/labels/enhancement"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ACC/$REPO/labels/invalid"
@JamesKingdom
JamesKingdom / doimport.sh
Last active June 4, 2017 10:59
touch files
echo "enter url"
read url
wget --output-document=temp.osm.pbf $url
osm2pgsql --slim -C 7500 --number-processes 8 temp.osm.pbf
touch /var/lib/mod_tile/planet-import-complete
rm temp.osm.pbf
/etc/init.d/renderd restart
@JamesKingdom
JamesKingdom / tile.sh
Created June 4, 2017 10:37
switch2osm script
apt-get update
apt-get install software-properties-common
add-apt-repository ppa:kakrueger/openstreetmap
apt-get update
apt-get install libapache2-mod-tile
wget http://download.geofabrik.de/europe/great-britain/england/west-sussex-latest.osm.pbf
osm2pgsql --slim -C 7500 --number-processes 8 west-sussex-latest.osm.pbf
touch /var/lib/mod_tile/planet-import-complete
/etc/init.d/renderd restart
@JamesKingdom
JamesKingdom / osm.js
Last active September 22, 2017 20:24
Mass retagger funciton for ID OSM editor
// select one or multiple things and ctrl+E to retag them
var context = id;
var addTags = { highway: 'residential'}; // change this as needed
//var removeTags = ['area','natural','landuse'];
function changeTags() {
if (iD.d3.event) { iD.d3.event.preventDefault(); }
var actions = [],