Skip to content

Instantly share code, notes, and snippets.

View jhbruhn's full-sized avatar
energized

Jan-Henrik Bruhn jhbruhn

energized
View GitHub Profile
@jhbruhn
jhbruhn / MailParse.java
Created April 5, 2012 09:52
MailParse from mail tingi Thunderbörd
package org.hans.uwe.werner;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
package org.gd.mater;
public class Dayz {
/**
* @param args
*/
public static void main(String[] args) {
Runnable run1 = new Runnable() {
@Override
@jhbruhn
jhbruhn / Auto.java
Created June 25, 2012 11:47
HeinzPeda
package corp.tuamater.werkstatt;
import java.util.Random;
public class Auto {
public enum Creator {
AUDI, VW, PEUGOT, RENAULT
};
private Creator creator;
@jhbruhn
jhbruhn / Heinz.md
Created August 7, 2012 14:58
An example

Good evening ladies and gentlemen. I am an example-gist which has just one purpose: be an example. I bet you didn't know this before!

I am a heading!

Now that we know who you are, I know who I am. I'm not a mistake! It all makes sense! In a comic, you know how you can tell who the arch-villain's going to be? He's the exact opposite of the hero. And most times they're friends, like you and me! I should've known way back when... You know why, David? Because of the kids. They called me Mr Glass.

Idea

Basically, this idea was stolen from gist.io but I was bored so I rewrote it with Node.js. Here's a list of colors (in german):

  • Rot
@jhbruhn
jhbruhn / karl.rb
Created September 22, 2012 19:44
Worst code evar
message.is_a LoginMessage ? @client.puts(JSON LoginResponseMessage.new) if message.validate_login : @client.close
@jhbruhn
jhbruhn / main.lua
Created December 26, 2012 23:38
Löve ist ja schon nais
paddleWidth = 10*2
paddleHeight = 200
ballRadius = 10
width = 800
height = 600
function love.load()
love.physics.setMeter(64)
world = love.physics.newWorld(0, 0, true)
package org.alternadev.brainfuck;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.charset.Charset;
@jhbruhn
jhbruhn / puushload.rb
Last active December 12, 2015 08:58
Download "All" Puush.me-files in a crappy way (but it works, yay!) requires 'trollop' gem
require 'net/http'
require 'fileutils'
require 'logger'
require 'trollop'
CHARS = ("0".."9").to_a + ("a".."z").to_a + ("A".."Z").to_a
opts = Trollop::options do
opt :output_dir, "Output-Directory", :short => 'o', :default => "files", :type => String
opt :log_file, "Logfile-Path", :short => 'l', :default => "STDOUT", :type => String
el:"", //Feed-Item-List
events: { 'scroll': 'checkScroll' },
checkScroll: function () {
var triggerPoint = 100; // 100px from the bottom
if( !this.isLoading && this.el.scrollTop + this.el.clientHeight + triggerPoint > this.el.scrollHeight ) {
this.addPage(); //oderso
}
}
@jhbruhn
jhbruhn / SConstruct
Last active December 20, 2015 03:09
POCA!1!!1! build with scons
env = Environment() #init env
poca = env.Program(target = 'poca', source = ['poca.c', 'vector.c'], LIBS=['ncurses', 'form']) #build POCA
# install POCA
env.Install("/usr/local/bin", poca)
env.Alias('install', ['/usr/local/bin'])