Skip to content

Instantly share code, notes, and snippets.

Avatar

Tobias Preuss johnjohndoe

View GitHub Profile
View .gitignore
build
node_modules
.DS_Store
View aerzte-berlin-lichtenberg.geojson
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 Aug 29, 2015
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
View Bundestagswahlkeise-2013-Berlin.geojson
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 Aug 29, 2015
Pegelstände-Scraper für Sachsen, http://scraperwiki.com
View water_level_saxony.py
#!/usr/bin/env python
import scraperwiki
import requests
import lxml.html
from collections import namedtuple
from datetime import datetime
View Landkreise-Brandenburg.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Kindertagesstätten-in-Berlin-Marzahn-Hellersdorf.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View QGIS-temporal-query.md

SpatiaLite field

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

WHERE clause for temporal subset query

DATETIME(
View rsync-backup.md

Backup via rsync

$ rsync -rt --delete --delete-excluded --links \
--exclude-from '/home/user/rsync-home-exclude.txt' /home/user/ server:/backups/home
@johnjohndoe
johnjohndoe / mount-encrypted-partition.md
Last active Aug 29, 2015
How to mount an encrypted home partition?
View mount-encrypted-partition.md

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 / android-shell-commands.md
Last active Aug 29, 2015
Android shell commands
View android-shell-commands.md

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