Skip to content

Instantly share code, notes, and snippets.

View madmuffin1's full-sized avatar
🏠
Working from home

Patrick Brückner madmuffin1

🏠
Working from home
View GitHub Profile
@madmuffin1
madmuffin1 / fix.sh
Created July 23, 2014 14:37
Remove malicious code from scripts affected by mailpoet/wysija vulnerability
grep -l yhvobwawyd * -R | xargs -i sh -c "echo {} && sed -i '1 s/^.*$/<?php/' \"{}\";"
@madmuffin1
madmuffin1 / transformKeys.php
Last active December 21, 2015 11:55 — forked from goldsky/transformKeys.php
Convert under_score type array's keys to camelCase type array's keys and likewise
<?php
/**
* Convert under_score type array's keys to camelCase type array's keys
* @param array $array array to convert
* @return array camelCase array
*/
public function camelCaseKeys($array) {
$camelCaseArray = array();
foreach ($array as $key => $val) {
# fork from https://community.home-assistant.io/t/daily-thermostat-schedule/395834,
# which did not work for some of my thermostats, as the switch heat/cool never matched any value
blueprint:
name: Heating Daily Schedule
description: Set the target TRV temperature based on its mode.
domain: automation
input:
climate_id: