Skip to content

Instantly share code, notes, and snippets.

@troelsselch
troelsselch / autoloader.php
Created November 16, 2016 22:16
PHP Custom Autoloader
<?php
spl_autoload_register(function($classname) {
$prefix = 'Laundrette\\';
$length = strlen($prefix);
if (substr($classname, 0, $length) == $prefix) {
$filename = 'src/' . substr($classname, $length) . '.php';
$filename = str_replace('\\', '/', $filename);
if (file_exists($filename)) {
require_once($filename);

Keybase proof

I hereby claim:

  • I am troelsselch on github.
  • I am tss (https://keybase.io/tss) on keybase.
  • I have a public key whose fingerprint is 43D1 0739 77C9 F21C EA50 B750 C443 5007 6F49 E4E5

To claim this, I am signing this object:

@troelsselch
troelsselch / stop-google.user.js
Last active October 24, 2015 12:38
Stop google key hijacking
// ==UserScript==
// @name Google stop focus
// @description Stop google from focusing the search input on every key press. Compatible with Firefox, Chrome, and Opera.
//
// @run-at document-start
// @include http://*.google.*
// @include https://*.google.*
// Source http://userscripts-mirror.org/scripts/review/132237
// ==/UserScript==
// ==UserScript==
// @name Tumblr No Notifications
// @namespace troelsselch
// @description Removes the notification badge on the home button
// @include https://www.tumblr.com/dashboard
// @version 1
// @grant none
// ==/UserScript==
jQuery('#new_post_notice_container').hide();