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
find . -type f -size +20000k -exec ls -lh {} \; | awk '{ print $8 ": " $5 }' |
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
pg_dump -Unrcrm -h 192.168.x.x --exclude-table=public.foo --exclude-table=public.bar dbname | bzip2 -c > ~/file.bz2 | |
bzip2 -d db.sql.bz2 |psql test test | |
SELECT relname, reltuples, relpages * 8 / 1024 AS "MB" FROM pg_class ORDER BY relpages DESC; |
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 relname, reltuples, relpages * 8 / 1024 AS "MB" FROM pg_class ORDER BY relpages DESC; |
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
It is possible to create files of arbitrary size on a linux machine using the dd command. Here is an example: | |
$ cd /tmp | |
$ dd if=/dev/zero of=bigfile bs=1024 count=1048576 | |
This will create a file of size 1024 * 1048576 bytes (or 1 GB). In this command | |
* if - input file | |
* of - output file or the file to be created | |
* bs - block size in bytes |
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
ssh -L 9090:localhost:9090 root@12.34.56.78 -N |
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
history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head |
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
#!/bin/bash | |
# Install Guide: | |
# 1. Use http://www.virtualbox.org if you use Windows or OS X | |
# 2. Download http://www.ubuntu.com 9.04 Desktop Edition and install into VM. | |
# 3. In your ubuntu console: | |
# $ wget http://gist.github.com/raw/180820/333b288a1b5df8df09842bfcfa248fa252f0cf3b/rails_install_script_on_ubuntu | |
# $ chmod 555 rails_install_script_on_ubuntu | |
# $ ./rails_install_script_on_ubuntu | |
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
Configuration summary | |
+ using system PCRE library | |
+ using system OpenSSL library | |
+ md5: using OpenSSL library | |
+ sha1 library is not used | |
+ using system zlib library | |
nginx path prefix: "/usr/local/nginx" | |
nginx binary file: "/usr/local/nginx/sbin/nginx" | |
nginx configuration prefix: "/usr/local/nginx/conf" |
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
establish_connection( | |
:adapter=> "postgresql", | |
:host => "localhost", | |
:database=> "test", | |
:schema_search_path=> "my", | |
:username=>'test', | |
:password=>'test') |
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
Add this in .htaccess | |
php_value allow_call_time_pass_reference 1 |
OlderNewer