Skip to content

Instantly share code, notes, and snippets.

View aebersold's full-sized avatar

Simon aebersold

View GitHub Profile
from sys import argv
import os
script, filename, queries, documents = argv
o = open("out.html", "w")
o.write("<html><body>")
with open(filename) as f:
content = f.readlines()
@aebersold
aebersold / tm-multiply.php
Created November 14, 2013 19:42
PHP script to simulate a turing machine, which calculates an unary multiplication.
<?php
/**
* Turing Machine Simulator in PHP
* Purposely built for unary multiplication with a two tape TM.
*
* input format: 001000
* the '1' seperates the first from the second integer
*
* result of the multiplication will be on the second tape.
*
@aebersold
aebersold / laravel-cheat-sheet.md
Last active October 13, 2015 16:47
laravel cheat-sheet

Laravel Cheat-Sheet

Common usage

View::share('user', $user); Makes $user available to all views.

URI::segment(1); First segement uf an URL (eg. site.com/de/hello = de).