Skip to content

Instantly share code, notes, and snippets.

@kai101
kai101 / gist:7782658
Created December 4, 2013 05:10
How to install php memcache on windows 8
http://ghita.org/tipoftheday/xamp-with-memcache-on-windows
http://www.leonardaustin.com/technical/how-to-install-memcached-on-xampp-on-windows-7
1. Locate you working php.ini (you can always check the correct path by looking at the phpinfo())
2. Make all the configs from the article above.
3. Download php_memcache.dll from http://windows.php.net/downloads/pecl/snaps/memcache/3.0.6/. For me php_memcache-3.0.6-5.4-ts-vc9-x86.zip worked, because I'm using PHP 5.4. Put it in \php\ext
AutoIT + Firefox + mozrepl + FF.au3
Browser ownage! be it browser testing, game bot building.
http://www.autoitscript.com/autoit3/
http://www.mozilla.com/firefox/
http://github.com/bard/mozrepl/wikis/home
http://thorsten-willert.de/Themen/AutoIt-FF.au3/
@kai101
kai101 / highcharts_export_phantomjs.markdown
Last active September 7, 2015 07:13
highchart export-module ERROR: the options variable was not available or couldn't be parsed

ERROR: the options variable was not available or couldn't be parsed

starting phantomjs server:

/usr/lib/node_modules/phantomjs/lib/phantom/bin/phantomjs ~/Code/highchart-export/highcharts-convert.js -host 127.0.0.1 -port 3005

testing command:

@kai101
kai101 / gist:6c114fa1c70bda500997
Created November 12, 2015 02:44
Check Hex Chinese character Encoding.
$c = "样本平均价";
foreach(mb_list_encodings() as $en){
echo $en.' ';
echo bin2hex(mb_convert_encoding($c, $en));
echo "\r\n";
}
@kai101
kai101 / setup.sh
Created September 27, 2017 03:50
git setup username and remember credential
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
git config --global credential.helper 'cache --timeout=3600'
GRANT ALL PRIVILEGES ON ats_prod.* TO 'username'@'localhost' IDENTIFIED BY 'password';
create database <database_name> character set UTF8 collate utf8_bin
# bashrc collection
alias sshprod="ssh user@host -p 22"
@kai101
kai101 / wkhtmltopdf.md
Last active August 24, 2023 09:10
How to Install Wkhtmltopdf 12.4 with patched Qt?

How to Install Wkhtmltopdf 12.4 with patched Qt?

For earlier version whos suffering from versionlock syndrome. Please follow the instructions to rollback to older SSL interface. Do not alarm by the fallback ssl interface, they received security patches for vulnerability discovered.

Current version of apt-get wkhtmltopdf does not come with Qt patch. There are some issue going with both Qt patched and non-patched. Most common use case is compatible with the patched Qt.

@kai101
kai101 / readme.md
Created January 30, 2018 02:24
How to install phantomjs 17.10

Using phantom js to render a html page into pdf/image.

sudo apt-get install phantomjs

fixing

QXcbConnection: Could not connect to display
@kai101
kai101 / readme.md
Last active February 13, 2018 01:19
Rsync over shared connection.

Yes, see the ControlMaster and ControlPath options.

You can start the master connection with:

mkdir ~/.ssh/ctl
ssh -nNf -o ControlMaster=yes -o ControlPath="$HOME/.ssh/ctl/%L-%r@%h:%p" user@host

And then use rsync with:

rsync -e "ssh -o 'ControlPath=$HOME/.ssh/ctl/%L-%r@%h:%p'" ...