Skip to content

Instantly share code, notes, and snippets.

@watermusic
watermusic / mysqldump
Created March 25, 2014 07:59
Backup your Mysql Database with mysqldump
mysqldump -h %host% -u %user% -p --single-transaction --databases %database% > ~/%database%.sql
- single-transaction -> live backup without locking tables
@watermusic
watermusic / Siege
Created March 25, 2014 07:57
Load Test and Benchmark your web application using Siege
siege -d10 -c50 -i -f /path_to_file/testfile.txt
Siege utility can have following options.
-cNUM : is to simulate the number of concurrent users (NUM count can be changed).
-dNUM : is the duration in second to run the test. (NUM is in seconds)
-rNUM : is the number of times the test can be repeated.
-v : is the verbose mode. Transaction information is printed on the screen.
-i : is the for internet. The requests are fired randomly between the number given in -d option.
-f : is used if multiple urls are tested from file
@watermusic
watermusic / composer-memory-limit
Last active May 3, 2019 07:20
Composer update memory limit
DEV
---
New Package
###########
php -dmemory_limit=-1 composer.phar require "repo/package" -o --prefer-dist