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
netstat -anpt|grep httpd |grep ESTABLISHED |
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
hdparm -Y /dev/sda |
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
// Replace calculated values with static data. From A to H from 1 to 70 | |
function breakExcelLinksInSheet( $sheet ){ | |
$labels = array( 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H' ); | |
foreach( $labels as $label ){ | |
for( $i = 1; $i < 70; $i++ ){ | |
$val = $sheet->getCell( $label.$i ); | |
//for incorrect formulas take old value |
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
function whois_query($domain) { | |
// fix the domain name: | |
$domain = strtolower(trim($domain)); | |
$domain = preg_replace('/^http:\/\//i', '', $domain); | |
$domain = preg_replace('/^www\./i', '', $domain); | |
$domain = explode('/', $domain); | |
$domain = trim($domain[0]); | |
// split the TLD from domain name |
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
<?php | |
// Our custom error handler | |
function nettuts_error_handler($number, $message, $file, $line, $vars){ | |
$email = " | |
<p>An error ($number) occurred on line | |
<strong>$line</strong> and in the <strong>file: $file.</strong> | |
<p> $message </p>"; | |
$email .= "<pre>" . print_r($vars, 1) . "</pre>"; |
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
du -ch --max-depth=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
grep -Rsl "GIF89a1" /home/ > hacked2.txt |
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
// Write to log | |
logf, er := os.OpenFile("/home/go/src/app/event.log", os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0640) | |
if er != nil { | |
log.Fatalln(er) | |
} | |
log.SetOutput(logf) | |
log.Println("START") | |
log.SetFlags(log.Ldate | log.Ltime | log.Lmicroseconds | log.Lshortfile) |
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
run in application folder: | |
echo '{"require":{"swiftmailer/swiftmailer": "5.2.*@dev"}}' > composer.json && composer install |
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
MATCH (n) | |
WHERE NOT EXISTS((n)--()) | |
RETURN n |