This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mb_unserialize($string) | |
{ | |
$recovered = preg_replace_callback( | |
'!(?<=^|;)s:(\d+)(?=:"(.*?)";(?:}|a:|s:|b:|d:|i:|o:|N;))!s', | |
function($match) { | |
return 's:' . mb_strlen($match[2], '8bit'); | |
}, | |
$string | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name BW | |
// @version 1 | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js | |
// @include http://brokenworlds.online* | |
// ==/UserScript== | |
window.addEventListener('load', function() { | |
$(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tail -n 100000 kj.log | grep -o -E "\w+$" | sort -u |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
username=$1 | |
password=$2 | |
dbname=$3 | |
for file in *.sql; do | |
echo "${file%.sql}.sql started\n"; | |
mysql -u $username -p$password --default-character-set=utf8 $dbname < "${file%.sql}.sql"; | |
echo "${file%.sql}.sql done\n"; | |
done; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
username=$1 | |
password=$2 | |
dbname=$3 | |
for file in *.sql; do | |
echo "${file%.sql}.sql started\n"; | |
mysql -u $username -p$username --default-character-set=utf8 $dbname < "${file%.sql}.sql"; | |
echo "${file%.sql}.sql done\n"; | |
done; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lsof -i :9000 | |
tcpdump -nn "port 9000" | |
watch -n1 'mysql -u "username" -pPASSW --exec="SHOW PROCESSLIST"' // REALTIME PROCESS LIST MYSQL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xdebug.profiler_append = 1 | |
xdebug.profiler_enable = 1 | |
xdebug.profiler_enable_trigger = 0 | |
xdebug.idekey="PHPSTORM" | |
xdebug.remote_enable=true | |
xdebug.remote_host=127.0.0.1 | |
xdebug.remote_port=9000 | |
xdebug.remote_connect_back=1 | |
xdebug.remote_autostart=1 | |
xdebug.remote_log="/usr/local/apache/logs/xdebug.log" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git merge -X theirs origin/develop |