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
| require 'open-uri' | |
| require 'nokogiri' | |
| def scrape | |
| 29.times do |i| | |
| page = i + 1 | |
| url = "http://djcode.posterous.com/?page=#{page}" | |
| doc = Nokogiri::HTML(open(url)) |
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/sudoers | |
| username ALL=(ALL) ALL | |
| # | |
| Open this file: | |
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
| alter table change field_name field_name int(11); | |
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
| cat /etc/passwd | |
| cat /etc/passwd | grep home | |
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/php.ini | |
| # | |
| PHP config file is here usually: | |
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
| date -s 12/8/2009 12:58:30 | |
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
| us = user cpu | |
| sy = system cpu | |
| id = idle CPU (high is good) | |
| wa = I/O wait (either RAM or disk. High here means prob not a cpu issue) | |
| Mem: free + Swap cached = actual free RAM | |
| iostat | |
| # | |
| Load average is the last: 1, 5 and 15 minutes. |
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
| iostat | |
| tps: transaction per second | |
| Blk_read/s: blocks read per second | |
| Blk_read: total block read | |
| Blk_wrtn: total blocks written | |
| iotop | |
| # | |
| Use iostat to check for high disk bound load. |
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
| ssh-keygen -t dsa | |
| scp id_dsa.pub username@example.com:~/.ssh/authorized_keys2 | |
| ssh-add | |
| exec ssh-agent bash | |
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
| $ find / -type f -name filename | |