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 / html5.php
Created August 9, 2012 12:10
HTML Purifier definition for some HTML5 tags
<?php
// http://developers.whatwg.org/sections.html
$def->addElement('section', 'Block', 'Flow', 'Common');
$def->addElement('nav', 'Block', 'Flow', 'Common');
$def->addElement('article', 'Block', 'Flow', 'Common');
$def->addElement('aside', 'Block', 'Flow', 'Common');
$def->addElement('header', 'Block', 'Flow', 'Common');
$def->addElement('footer', 'Block', 'Flow', 'Common');
@lluchs
lluchs / builder.rs
Last active November 14, 2020 10:57 — forked from anonymous/playground.rs
Rust builder pattern with lifetime on struct
struct Foo;
struct FooBuilder<'a> {
foo: &'a Foo,
}
impl Foo {
fn build(&self) -> FooBuilder {
FooBuilder { foo: &self }
}
}
@lluchs
lluchs / nginx-uberspace.md
Last active January 3, 2020 18:14
nginx auf dem Uberspace

nginx auf dem Uberspace

Installation

Lade die neueste "mainline"-Version (hier 1.7.9) von http://nginx.org/en/download.html herunter und entpacke sie:

$ wget http://nginx.org/download/nginx-1.7.9.tar.gz 
$ tar xf nginx-1.7.9.tar.gz
@lluchs
lluchs / test_runtimejoin.py
Created November 5, 2017 21:28
Script for automatically testing OpenClonk runtime join
#!/usr/bin/env python3
import pexpect
import os
import sys
import time
openclonk = './openclonk-server'
#scenario = 'planet/Tests.ocf/Minimal.ocs'
@lluchs
lluchs / links.rb
Created November 3, 2012 17:02
Convert Windows-.lnk files to symlinks
@lluchs
lluchs / PKGBUILD
Last active January 25, 2016 16:11
curlftpfs Arch package
# $Id: PKGBUILD 97936 2013-10-01 16:49:40Z bpiotrowski $
# Maintainer: Chris Brannon <cmbrannon79@gmail.com>
# Contributor: Allan McRae <mcrae_allan@hotmail.com>
# Contributor: Philip Nilsson <leffeman@gmail.com>
pkgname=curlftpfs
pkgver=0.9.2
pkgrel=6
pkgdesc="A filesystem for acessing FTP hosts based on FUSE and libcurl."
url="http://curlftpfs.sourceforge.net/"
@lluchs
lluchs / .SRCINFO
Last active January 19, 2016 16:45
openclonk PKGBUILD
# Generated by mksrcinfo v8
# Tue Jan 19 15:49:56 UTC 2016
pkgbase = openclonk
pkgdesc = Multiplayer-action-tactic-skill game
pkgver = 7.0
pkgrel = 3
url = http://openclonk.org
install = openclonk.install
arch = i686
arch = x86_64
@lluchs
lluchs / API.cpp
Last active January 4, 2016 15:19
ArgoUML-Export
#include "API.h"
namespace APIPackage-- {
void API::API()
// don't delete the following line as it's needed to preserve source code of this autogenerated element
// section 127-0-0-1--24a8b1be:142d267687f:-8000:0000000000000BDD begin
@lluchs
lluchs / in3
Last active January 4, 2016 13:59
asst5-page-replacement
0 1 1 0 1 4 1 6 1 1 8 5 5 7 0 0 3 15 12 6 1 10 20 11 8 24 23 3 18 22 6 3 32 26 12 9 12 3 37 12 39 41 21 23 38 34 30 1 16 34 29 8 24 6 3 47 12 19 33 31 31 11 50 38 25 64 1 8 39 4 47 69 67 52 50 63 2 20 32 76 49 55 11 67 5 73 25 4 29 76 60 79 15 5 47 81 82 24 28 96 45 39 24 29 54 28 13 17 29 10 88 87 16 73 42 65 23 7 28 23 76 27 121 38 106 4 61 85 28 6 31 55 18 17 93 63 112 15 131 90 23 129 86 9 20 99 20 80 48 131 98 63 1 48 94 131 63 144 66 149 31 73 0 95 14 154 17 88 28 111 63 141 67 121 112 91 7 114 18 63 39 69 18 70 145 15 82 109 73 61 95 113 55 147 144 123 162 127 87 156 50 123 17 89 162 59 123 51 66 41 51 126 148 128 28 72 140 31 106 18 13 209 100 88 201 223 16 222 94 10 221 8 119 168 105 107 65 193 23 206 70 121 108 132 208 211 79 20 189 53 73 158 0 114 161 151
@lluchs
lluchs / dltrack.js
Created July 6, 2013 15:47
Tracks downloads via GA events.
/* Downloads tracking */
jQuery(function() {
var dlr = /\.(?!html?|php)(\w{1,4})$/
jQuery('a').click(function() {
var m
if (typeof(ga) == 'function' && (m = dlr.exec(this.href))) {
ga('send', 'event', 'download', m[1], this.href)
}
})