Skip to content

Instantly share code, notes, and snippets.

View johnjohndoe's full-sized avatar

Tobias Preuss johnjohndoe

View GitHub Profile
@johnjohndoe
johnjohndoe / google.tsv
Created June 17, 2014 15:23
Layer information file for TileLayer Plugin, https://github.com/minorua/TileLayerPlugin
gs gs http://mt3.google.com/vt/lyrs=s,h&z={z}&x={x}&y={y} 1 0 19
@johnjohndoe
johnjohndoe / pdf2csv.rb
Created July 4, 2014 09:39
Digitize tables in PDF to CSV
require 'tabula'
pdf_file_path = "Abschiebungen.pdf"
outfilename = "Abschiebungen.csv"
out = open(outfilename, 'w')
extractor = Tabula::Extraction::ObjectExtractor.new(pdf_file_path, :all )
extractor.extract.each do |pdf_page|
pdf_page.spreadsheets.each do |spreadsheet|
@johnjohndoe
johnjohndoe / eclipse.desktop
Created December 3, 2014 12:48
Generic desktop file for Eclipse IDE in ~/.local/share/applications/
[Desktop Entry]
Version=1.0
Type=Application
Name=Eclipse
Icon=/home/USERNAME/bin/eclipse/eclipse-highres.png
Exec=env UBUNTU_MENUPROXY=0 "/home/USERNAME/bin/eclipse/eclipse"
Comment=Eclipse
Categories=Development;IDE;
Terminal=false
StartupWMClass=
@johnjohndoe
johnjohndoe / schedule.xml
Last active August 29, 2015 14:12
31c3 schedule.xml
<?xml version='1.0' encoding='utf-8' ?>
<schedule>
<version>1.5 To shine in a bright light</version>
<conference>
<acronym>31c3</acronym>
<title>31. Chaos Communication Congress</title>
<start>2014-12-27</start>
<end>2014-12-31</end>
<days>4</days>
<timeslot_duration>00:05</timeslot_duration>
@johnjohndoe
johnjohndoe / simplehttpserver.py
Created January 6, 2015 17:05
HAS BUGS!! NOT WORKING!!! SimpleHTTPServer capable of receiving HTTP GET and HTTP POST
#!/usr/bin/python
"""
Save this file as server.py
>>> python server.py 0.0.0.0 8001
serving on 0.0.0.0:8001
or simply
>>> python server.py
@johnjohndoe
johnjohndoe / geoserver.conf
Last active August 29, 2015 14:16
Upstart configuration for GeoServer
# GeoServer
# /etc/init/geoserver.conf
description "GeoServer upstart configuration"
# Stanzas
# When to start the service
start on runlevel [2345]
package com.pixite.fragment.widget;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Drawable.Callback;
import android.view.Gravity;
@johnjohndoe
johnjohndoe / myapplication.conf
Last active August 29, 2015 14:18
Upstart configuration for Django / Gunicorn project
# Upstart configuration for Django project called "myapplication"
# ===============================================================
#
# Location: /etc/init/myapplication.conf
#
# Status: sudo service myapplication status
# Start: sudo service myapplication start
# Stop: sudo service myapplication stop
description "My application"
@MultipartBody
public class Article {
String author;
File photo;
}