Skip to content

Instantly share code, notes, and snippets.

View johnjohndoe's full-sized avatar

Tobias Preuss johnjohndoe

View GitHub Profile
@johnjohndoe
johnjohndoe / gist:48e51585838963e1aa378e0816d11c04
Created May 9, 2016 09:59
Most frequently used shell commands
history | awk {'print $2, $3, $4'} | sort | uniq -c | sort -k1 -rn | head -n 30
@johnjohndoe
johnjohndoe / TaskoMatchers.java
Created March 28, 2016 15:51 — forked from anonymous/TaskoMatchers.java
Matchers file from Episode 29 of Caster.IO - Creating Custom ViewMatchers
package com.donnfelker.tasko;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.StateListDrawable;
import android.support.test.espresso.matcher.BoundedMatcher;
import android.text.TextUtils;
import android.view.View;
@johnjohndoe
johnjohndoe / ssl-certificate.sh
Created March 22, 2016 10:35
Output SSH certificate to console
echo | openssl s_client -showcerts -servername example.com -connect 1.2.3.4:443 2>/dev/null | openssl x509 -inform pem -noout -text

LED Table @ FFII

This is a 20x14 Pixels LED table. Each of the pixels can display almost all colors.

You can play the game with the controllers. It is in ffii.ino on this page. You will need to upload it, see Programming. If you would like to see the making of the LED table, you can visit Youtube. If you have any questions, you can leave a comment below or contact me via email.

Usage

To use the LED table you can plug it into the power plug in the wall. If you would like to use the controllers, one of their ends should be plugged into A0 or A1 or A2 or A3 on the Arduino and the other end into Ground or GND or the blue line on the breadboard. You will notice if they are not plugged in correctly: They will not work. In rar cases where you connect 5V and ground directly to eachother, you will melt the cables or destroy the Arduino. Do not do that.

@johnjohndoe
johnjohndoe / howto.md
Created March 3, 2016 14:30 — forked from neworld/howto.md
How to make faster Android build without sacrificing new api lint check

Original solution sacrifices new api lint check.

Here my solution:

int minSdk = hasProperty('minSdk') ? minSdk.toInteger() : 16

apply plugin: 'com.android.application'

android {
 compileSdkVersion 23
@johnjohndoe
johnjohndoe / ferry_terminals_railway_stations_within_200.sql
Last active December 15, 2015 10:07
Ferry terminals and railway stations within 200 #dbhackathon #bahnhofsquartett
CREATE OR REPLACE VIEW
ferry_terminals_railway_stations_within_200 AS
SELECT
ferry_terminals.name AS ft_name,
railway_stations.name AS rs_name
FROM
ferry_terminals, railway_stations
WHERE
ST_DISTANCE(
ST_TRANSFORM(ferry_terminals.the_geom, 3857),
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[
{
"group": "Lecture Rooms",
"rooms": [
{
"slug": "saal1",
"schedulename": "Saal 1",
"thumb": "http://localhost/streaming-website/thumbs/s1.png",
"link": "http://localhost/streaming-website/saal1/",
"display": "Saal 1",
@johnjohndoe
johnjohndoe / postboxes_around.xml
Last active December 12, 2015 01:01
Query for Overpass Turbo to find post boxes around a certain location
<osm-script output="json">
<query type="node">
<around lat="52.516667" lon="13.383333" radius="600"/>
<has-kv k="amenity" v="post_box"/>
</query>
<osm-script/>
<print/>
#!/usr/bin/env ruby
require "rubygems"
require "xml/libxml"
require "uri"
require "net/http"
require "time"
URL = "http://conference.opensuse.org/indico//conferenceOtherViews.py?confId=2&view=xml&fr=no"