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
window.onerror = function(message, url, linenumber) { | |
alert("JavaScript error: " + message + " on line " + linenumber + " for " + 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
window.onerror = function(message, file, lineNumber) { | |
new Image().src = "/this_url_doesnt_exist?message=" | |
encodeURIComponent(message) | |
"&file=" + encodeURIComponent(file) | |
"&lineNumber=" + encodeURIComponent(lineNumber); | |
}; |
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
window.onerror = function(message, file, lineNumber) { | |
_gaq.push([ | |
'_trackEvent', | |
'error', | |
file + ':' + lineNumber, | |
message + '' | |
]); | |
}; |
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
<?php | |
$userAgent = $_SERVER['HTTP_USER_AGENT']; | |
$isMobile = false; | |
if (preg_match("/Android/", $userAgent, $match)) { | |
$isMobile = true; | |
} | |
if (preg_match("/iPhone/", $userAgent, $match)) { |
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
<script type="text/javascript"> | |
if (document.referrer.match(/google\.(com|co\.jp)/gi) && document.referrer.match(/cd/gi)) { | |
var myString = document.referrer; | |
var r = myString.match(/cd=(.*?)&/); | |
var rank = parseInt(r[1]); | |
var kw = myString.match(/q=(.*?)&/); | |
if (kw[1].length > 0) { | |
var keyWord = decodeURI(kw[1]); | |
} else { |
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
$("td:contains('domain-test20130322122205.com'):eq(3)").parent("tr").find("td:first > input").attr('checked', 1); |
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
git push origin $(git branch | grep -e '^*' | sed "s/^*//g") |
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
while true; do ping -c 1 example.com; sleep 30; done |
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
smbclient //example.com/shared -c "cd /var/www; put /tmp/hoge.txt hoge.txt" -U username 'passwd' |
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
REPO="$(git remote -v | grep 'fetch' | sed 's/origin.*://g' | sed 's/.git (fetch)//g')"; git log --pretty="%s \n https://github.com/$REPO/commit/%H" --author="Shohei Yamasaki" --since=1.days | sed 's/\\n/\ | |
/g'; unset REPO |