This file contains hidden or 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
/etc/init.d/mysqld stop | |
echo -e "mysqltmp\t/var/mysql/tmp\ttmpfs\tmode=0777\t0 0" >> /etc/fstab | |
mkdir /var/mysql/tmp | |
chown -R mysql:mysql /var/mysql/tmp/ | |
my.cnf /var | |
mount -a | |
/etc/init.d/mysqld start |
This file contains hidden or 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
#!/bin/bash | |
SELENIUM_HOME="/var/lib/selenium/selenium-server-standalone-2.25.0.jar" | |
SELENIUM_PORT="5555" | |
SELENIUM_LOG="/var/log/selenium/selenium-output.log" | |
SELENIUM_ERROR_LOG="/var/log/selenium/selenium-error.log" | |
SELENIUM_PID_FILE="/tmp/selenium.pid" | |
case "${1:-''}" in | |
'start') |
This file contains hidden or 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
# list files | |
$ rpm -ql packageName | |
$ rpm -qpl file.rpm | |
# list rpm dependencies (not installed) | |
$ rpm -Uvh --test <package.rpm> | |
# list rpm dependencies (installed) | |
$ rpm rpm -qR <package.rpm> |
This file contains hidden or 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
vboxmanage list vms | awk '{print $2;}' | xargs -I vmid VBoxManage unregistervm vmid --delete | |
VBOXID=$(vboxmanage list vms | grep packer | awk '{ print $2 }') | |
vboxmanage controlvm $VBOXID poweroff ; vboxmanage unregistervm $VBOXID --delete ; rm ~/VirtualBox\ VMs/packer-virtualbox-iso/* -rf |
This file contains hidden or 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
LAST_TAG=$(git for-each-ref refs/tags --sort=-taggerdate --format='%(refname)' --count=1) | |
LAST_VERSION_STABLE=$(echo $LAST_TAG | sed 's/refs\/tags\///g') | |
echo $LAST_VERSION_STABLE | |
git describe --tags `git rev-list --tags --max-count=1` |
This file contains hidden or 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 'DROP FUNCTION ' || ns.nspname || '.' || proname | |
|| '(' || oidvectortypes(proargtypes) || ');' | |
FROM pg_proc INNER JOIN pg_namespace ns ON (pg_proc.pronamespace = ns.oid) | |
WHERE ns.nspname = 'my_messed_up_schema' order by proname; |
This file contains hidden or 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
screen | |
screen -l #list | |
screen -rx # attach last screen | |
ctrl-shift a-d #detach | |
tmux | |
tmux list-session | |
tmux attach-session | |
ctrl b d |
This file contains hidden or 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 format-patch branch1..master | |
git ma *.patch |
This file contains hidden or 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
Exporting: | |
mysqldump -u user -p database | gzip > database.sql.gz | |
Importing: | |
gunzip < database.sql.gz | mysql -u user -p database |
This file contains hidden or 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
\c metadata | |
CREATE OR REPLACE FUNCTION drop_tables(_schema text) | |
RETURNS void AS | |
$func$ | |
BEGIN | |
EXECUTE ( | |
SELECT 'DROP TABLE ' | |
|| string_agg(quote_ident(t.tablename), ', ') | |
|| ' CASCADE' | |
FROM pg_tables t |