Skip to content

Instantly share code, notes, and snippets.

View johnjohndoe's full-sized avatar

Tobias Preuss johnjohndoe

View GitHub Profile
build
node_modules
.DS_Store
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@johnjohndoe
johnjohndoe / Bundestagswahlkeise-2013-Berlin.geojson
Last active August 29, 2015 13:58
Geometrien der Bundestagswahlkeise 2013 in Berlin, http://daten.berlin.de/datensaetze/geometrien-der-bundestagswahlkeise-2013-berlin, Amt für Statistik Berlin-Brandenburg,ogr2ogr -f GeoJSON -s_srs EPSG:3857 -t_srs EPSG:4326 Wahlkreise.geojson Wahlkreise.shp
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@johnjohndoe
johnjohndoe / water_level_saxony.py
Last active August 29, 2015 13:58
Pegelstände-Scraper für Sachsen, http://scraperwiki.com
#!/usr/bin/env python
import scraperwiki
import requests
import lxml.html
from collections import namedtuple
from datetime import datetime
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@johnjohndoe
johnjohndoe / QGIS-temporal-query.md
Created April 29, 2014 14:16
Temporal query in QGIS

SpatiaLite field

  • Column name: time
  • Type: VARCHAR
  • Example value: 2014/04/25 20:30:00

WHERE clause for temporal subset query

DATETIME(
@johnjohndoe
johnjohndoe / mount-encrypted-partition.md
Last active August 29, 2015 14:01
How to mount an encrypted home partition?

How to mount an encrypted home partition?

First add the passphrase

$ sudo ecryptfs-add-passphrase --fnek

Which gets me the following information:

Inserted auth tok with sig [aaaaaaaaaaaaaaaa] into the user session keyring

@johnjohndoe
johnjohndoe / rsync-backup.md
Created May 10, 2014 21:40
Backup via rsync

Backup via rsync

$ rsync -rt --delete --delete-excluded --links \
--exclude-from '/home/user/rsync-home-exclude.txt' /home/user/ server:/backups/home
@johnjohndoe
johnjohndoe / android-shell-commands.md
Last active August 29, 2015 14:01
Android shell commands

Convert file names to lowercase

$> for i in $(find . -type f -name "*[A-Z]*"); do mv "$i" "$(echo $i | tr A-Z a-z)"; done

Replace hyphen with underbar in all files

$> for i in $(find . -type f -name "*[a-z]*"); do mv "$i" "$(echo $i | tr '-' '_')"; done