Skip to content

Instantly share code, notes, and snippets.

@mjdietzx
mjdietzx / install-tesla-driver-ubuntu.sh
Last active December 23, 2023 11:03
Install TESLA driver for ubuntu 16.04
# http://www.nvidia.com/download/driverResults.aspx/117079/en-us
wget http://us.download.nvidia.com/tesla/375.51/nvidia-driver-local-repo-ubuntu1604_375.51-1_amd64.deb
sudo dpkg -i nvidia-driver-local-repo-ubuntu1604_375.51-1_amd64.deb
sudo apt-get update
sudo apt-get -y install cuda-drivers
echo "Reboot required."
anonymous
anonymous / overpass.geojson
Created March 24, 2016 00:31
data exported by overpass turbo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
anonymous
anonymous / overpass.geojson
Created March 24, 2016 00:30
data exported by overpass turbo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aaronpdennis
aaronpdennis / hdm.json
Last active October 20, 2016 23:16
Humanitarian Data Model Layers and OpenStreetMap tags
{
"water_source": {
"class": {
"water well": ["man_made=water_well"],
"water tower": ["man_made=water_tower"],
"water tank": ["man_made=storage_tank", "man_made=water_tank"],
"spring": ["natural=spring"],
"drinking water": ["amenity=drinking_water"]
},
"potable": {

What kind of iteration to use when in JavaScript

For loops

for (var i = 0; i < array.length; i++) {
}
  • Code has to run in old versions of IE.
@jwass
jwass / geojsonio_embed.ipynb
Created August 18, 2014 18:02
Embed geojson.io in a Jupyter / IPython notebook using geojsonio.py
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@paulallies
paulallies / gist:0052fab554b14bbfa3ef
Last active November 12, 2023 23:00
Remove node_modules from git repo
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin <branch-name>
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active June 16, 2024 13:44
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@akkerman
akkerman / Install PostGIS and GeoServer on Ubuntu 13.04.md
Last active May 28, 2023 01:53
Install PostGIS and GeoServer on Ubuntu 13.04

Install PostGIS and GeoServer on Ubuntu 13.04

PostGIS installation

Postgresql

Install the server:

sudo apt-get install postgresql-9.1 postgresql-contrib-9.1 pgadmin3

Execute the psql command under user postgres (sudo -u postgres)
and connect to database postgres (psql postgres):

@benbalter
benbalter / geojson-conversion.sh
Last active April 23, 2024 13:16
Bulk convert shapefiles to geojson using ogr2ogr
# Bulk convert shapefiles to geojson using ogr2ogr
# For more information, see http://ben.balter.com/2013/06/26/how-to-convert-shapefiles-to-geojson-for-use-on-github/
# Note: Assumes you're in a folder with one or more zip files containing shape files
# and Outputs as geojson with the crs:84 SRS (for use on GitHub or elsewhere)
#geojson conversion
function shp2geojson() {
ogr2ogr -f GeoJSON -t_srs crs:84 "$1.geojson" "$1.shp"
}