dig +short A <hostname>
du -a / | sort -n -r | head -n 10
sed -i 's/old-word/new-word/g' *.txt
| function get_months_in_range($start, $end, $format='timestamp', $create_empty_array=false) { | |
| $i = $formatted_i = $start = strtotime($start); | |
| if( $format != 'timestamp' ) $formatted_i = date($format, $i); | |
| $end = strtotime($end); | |
| $dates = $create_empty_array ? array($formatted_i => array()) : array($formatted_i); | |
| while($i < $end) { | |
| $month = $formatted_day = mktime(0, 0, 0, date('m', $i)+1, date('d',$i), date('Y', $i)); | |
| if( $format != 'timestamp' ) { | |
| $formatted_month = date($format, $month); | |
| } |
| function uuid() { | |
| $data = openssl_random_pseudo_bytes(16); | |
| $data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0010 | |
| $data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10 | |
| return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4)); | |
| } |
| function send_email( $to, $from, $subject, $message, $html=true ){ | |
| // Set the headers | |
| $headers = "From: ".$from."\r\n"; | |
| $headers .= "Reply-To: ".$from."\r\n"; | |
| if( defined('BCC_CONTACT_EMAIL') ) { | |
| $headers .= 'Bcc: ' . BCC_CONTACT_EMAIL . "\r\n"; | |
| } | |
| wget \ | |
| -e robots=off \ | |
| --referer="http://www.google.com" \ | |
| --user-agent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6" \ | |
| --recursive \ | |
| --no-clobber \ | |
| --page-requisites \ | |
| --convert-links \ | |
| --domains website.com \ | |
| website.com/ |
| <style> | |
| /* ... */ | |
| /*--- Preheader declaration in style block in addition to inline for Outlook */ | |
| .preheader { display:none !important; visibility:hidden; opacity:0; color:transparent; height:0; width:0; } | |
| </style> | |
| </head> | |
| <body> | |
| <!-- PRE-HEADER TEXT --> | |
| <span class="preheader" style="display: none !important; visibility: hidden; opacity: 0; color: transparent; height: 0; width: 0;">Preheader text shows up in GMail, iOS, Mail.app, & more: 75 text char limit</span> |
| Edit your .bashrc file: | |
| $ nano ~/.bashrc | |
| Add the following line, changing "New Title" to whatever you want | |
| PROMPT_COMMAND='echo -ne "\033]0;New Title\007"' | |
| NOTE: In some cases, when you switch to root or a different user, the window title may change back. If this is the case, simply add the previous line to /etc/.bashrc |
| I. Prerequisites | |
| $ apt-get install apache2-prefork-dev | |
| $ apt-get install apache2-threaded-dev | |
| $ apt-get install libgeoip-dev | |
| 1. Download and install mod_geoip2 | |
| http://www.maxmind.com/download/geoip/api/mod_geoip2/mod_geoip2-latest.tar.gz |
| [Configuration] | |
| FontName=Droid Sans Mono 10 | |
| ColorCursor=#0f0f49499999 | |
| ColorForeground=#838394949696 | |
| ColorBackground=#00002b2b3636 | |
| ColorPalette1=#070736364242 | |
| ColorPalette2=#dcdc32322f2f | |
| ColorPalette3=#858599990000 | |
| ColorPalette4=#b5b589890000 | |
| ColorPalette5=#26268b8bd2d2 |
| { | |
| "pools" : [ | |
| { | |
| "url" : "", | |
| "user" : "", | |
| "pass" : "" | |
| }, | |
| { | |
| "url" : "", | |
| "user" : "", |