Skip to content

Instantly share code, notes, and snippets.

View lluchs's full-sized avatar

Lukas Werling lluchs

  • Karlsruhe, Germany
View GitHub Profile
@lluchs
lluchs / keybase.md
Created July 15, 2014 19:45
Keybase proof

Keybase proof

I hereby claim:

  • I am lluchs on github.
  • I am luchs (https://keybase.io/luchs) on keybase.
  • I have a public key whose fingerprint is 1487 D617 520E 799D FC7D A2E7 9E0C A84A D471 92E5

To claim this, I am signing this object:

@lluchs
lluchs / imagus.json
Last active August 29, 2015 14:10
Imagus sieve definition for mwforum attachments
{
"mwforum": {
"link": "/attach_show.pl\\?aid=\\d+$",
"res": ":\nreturn new DOMParser().parseFromString($._, 'text/html').querySelector('.ims > img').src"
}
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>~/src/wren/example/syntax.wren.html</title>
<meta name="Generator" content="Vim/7.4">
<meta name="plugin-version" content="vim7.4_v1">
<meta name="syntax" content="wren">
<meta name="settings" content="number_lines,use_css,pre_wrap,no_foldcolumn,expand_tabs,line_ids,prevent_copy=">
<meta name="colorscheme" content="gruvbox">
#!/bin/zsh
set -e
utf8() {
iconv -f ISO-8859-1 -t UTF-8 $1 > $1.tmp
mv $1.tmp $1
}
files=($(find -name '*.txt' | xargs file | grep ISO-8859 | sed 's/:.*//'))
@lluchs
lluchs / itemlist.rb
Created June 19, 2011 00:05
Minecraft Wiki item list/images scraper
require 'rubygems'
require 'hpricot'
require 'mechanize'
require 'yaml'
class MCItems
Wiki = 'http://www.minecraftwiki.net'
attr_accessor :items
def initialize
@items = []
@lluchs
lluchs / search.coffee
Created July 16, 2011 14:05
Otherland Shop Search
form = '''
<form id=search>
<input type=text autofocus=autofocus><button type=submit>Suchen</button>
</form>
'''
# insert form
$('#nobotd > br').after form
form = $('#search')
@lluchs
lluchs / prices.json
Created August 7, 2011 21:58
New price JSON format
{
"shops":{
"13":"adventure",
"7":"artsupply",
"4":"bakery",
"2":"bookshop",
"5":"danger",
"12":"farm",
"20":"gadgets",
"21":"garden",
@lluchs
lluchs / make_update.bat
Created October 18, 2011 15:48
Batch script for creating Clonk updates, see http://www.ccan.de/cgi-bin/ccan/ccan-view.pl?a=view&i=4545
@ECHO OFF
color 70
cls
@ECHO For detecting differences:
@ECHO Old file? (the one which should be updated)
SET /P old=Enter:
cls
@ECHO For detecting differences:
@ECHO New file? (the file's current version)
SET /P new=Enter:
@lluchs
lluchs / ccan-framehistory.js
Created February 11, 2012 19:17
Updates the URL when browsing with frames
// @include http://ccan.de/*
// @include http://www.ccan.de/*
if(parent != window && location.pathname.indexOf('navbar') == -1) {
parent.history.replaceState(null, '', location.pathname + location.search)
}
@lluchs
lluchs / index.html
Created February 11, 2012 23:26
Regular polygon generator written with d3
<!doctype html>
<html>
<head>
<title>Polygon</title>
</head>
<body>
<section>
<form onsubmit='return false'>
<label>Number of edges: <input type=number min=3 value=5 /></label>
<label><input type=checkbox /> Show vertices</label>