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 / 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) {
@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/' \"{}\";"