Skip to content

Instantly share code, notes, and snippets.

@masum-sg
masum-sg / debugging tools.html
Created March 26, 2014 16:18
list of debugging tools
There are lots of other kinds of debugging tools available now.
1) Plumbr
2) AppDynamics
3) Chronon
4) Wireshark
5) HTTP profilers; Fiddler2, Charles, Live Http Headers
@masum-sg
masum-sg / Changing default document root in Plesk.html
Created March 26, 2014 15:40
Changing default document root in Plesk
Inorder to change default document root for a domain hosted in a plesk control panel we need to create vhost.conf file in the directory in which http.include for the domain resides. Directly changing the document root entry in httpd.include causes the modification to be overwritten with default entry since plesk overwrites entries in configuration files with database entries
Entries to be put in the vhost.conf follows
DocumentRoot /path/to/your/new/root
<Directory /path/to/your/new/root>
# Put this if you really need all options?
Options Indexes ExecCGI FollowSymLinks MultiViews
AddHandler cgi-script .cgi
# are you using .htaccess files? if not, set it from all to none
AllowOverride all
@masum-sg
masum-sg / mysql2sqliteconverter.sh
Created March 26, 2014 15:15
Converts a mysqldump file into a Sqlite 3 compatible file
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is chosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
@masum-sg
masum-sg / How to fix screen brightness in Ubuntu.sh
Created March 26, 2014 15:08
How to fix screen brightness in Ubuntu 12.04 (not maximum brightness after reboot)
sudo echo 4 > /sys/class/backlight/acpi_video0/brightness
Note: 4 is my setting. 20 is maximum.
You can set to 9 if you want to set the brightness as mid.
4 is good for me to use battery
After editing this Save and reboot your computer.