View gist:288772c69ce479d99673
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
SELECT CONCAT( | |
'SELECT "', | |
table_name, | |
'" AS table_name, COUNT(*) AS exact_row_count FROM ', | |
table_schema, | |
'.', | |
table_name, | |
' UNION ' | |
) | |
FROM INFORMATION_SCHEMA.TABLES |
View download_ie_vms.sh
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
cd ~/Downloads | |
# IE8 - Windows XP | |
wget -i https://az412801.vo.msecnd.net/vhd/VMBuild_20131127/VirtualBox/IE8_WinXP/Linux/IE8.WinXP.For.LinuxVirtualBox.txt | |
# IE8 - Windows 7 | |
wget -i https://az412801.vo.msecnd.net/vhd/VMBuild_20131127/VirtualBox/IE8_Win7/Linux/IE8.Win7.For.LinuxVirtualBox.txt | |
# Give execute permissions | |
chmod +x ./IE8*.sfx |
View gist:bddf76faf86370f17d14
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 stash show -p stash@{0} |
View gist:6180f965ad22474cf1a9
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
# Defaults, log in to command line and run these...clients like SQLYog may have already SET NAME utf8 so results would not necessarily show the defaults | |
SHOW VARIABLES LIKE "collation_database"; | |
+--------------------+-------------------+ | |
| Variable_name | Value | | |
+--------------------+-------------------+ | |
| collation_database | latin1_swedish_ci | | |
+--------------------+-------------------+ | |
SHOW VARIABLES LIKE "%character%"; |
View gist:f53c9e675a3d3e35366e
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
# Following needs the file permission, double check you look on the DB server to find the outfile! | |
SELECT .. INTO OUTFILE '/home/foo/myfile.csv' | |
# If no file permission try command line instead | |
mysql -e "SELECT * FROM foo ORDER BY bar" > '/path/to/file' |
View gist:04a296dfccf7a2207447
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
# Auto-complete works if you have ssh keys set up to the server | |
scp user@homeip:/path/to/file /local/path/ | |
# Credit http://superuser.com/questions/337776/how-do-i-scp-from-remote-machine-to-local-machine-when-i-am-outside-of-my-home-n |
View gist:d62a01a1e45822cfa0ea
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
Create new run configuration with following "Command Line > Interpreter Options" or add the options after "php" on the command line | |
/usr/bin/php -d xdebug.profiler_output_dir="/tmp/profiler" -d xdebug.profiler_enable_trigger=1 -d xdebug.profiler_enable=1 | |
Ref: http://confluence.jetbrains.com/display/PhpStorm/Profiling%20PHP%20applications%20with%20PhpStorm%20and%20Xdebug |
View gist:53c362475eba16ae4227
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
# From http://askubuntu.com/questions/82684/lowering-compiz-memory-usage#answer-82698 | |
# Kill compiz completely, including all child processes, freeing it's memory: | |
killall -9 compiz & | |
# Run unity and give you back a free terminal. | |
unity & disown |
View gist:27fc62d1725ec373678c
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 fetch | |
git branch --track branch-name origin/branch-name | |
# From http://stackoverflow.com/a/11262780/682754 |
View gist:1716a457a11fa5158860
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
# in-prompt git branch indicator | |
parse_git_branch() { | |
# ref http://pastie.textmate.org/170118 | |
# ref http://www.bramschoenmakers.nl/en/node/511 | |
# ref http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html | |
#also see http://henrik.nyh.se/2008/12/git-dirty-prompt | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' -e 's/\(............\)..*/\1…/' -e 's/\(..*\)/[\1]/' -e 's/^\[master\]$/\x1b[41m&\x1b[0m/' -e 's/^\[test\]$/\x1b[45m&\x1b[0m/' -e 's/^\[demo\]$/\x1b[44m&\x1b[0m/' | |
} | |
PS1="\w \$(parse_git_branch)$ " |
OlderNewer