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
while true; do ping -c 1 example.com; sleep 30; done |
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
$("td:contains('domain-test20130322122205.com'):eq(3)").parent("tr").find("td:first > input").attr('checked', 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
<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 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 | |
$userAgent = $_SERVER['HTTP_USER_AGENT']; | |
$isMobile = false; | |
if (preg_match("/Android/", $userAgent, $match)) { | |
$isMobile = true; | |
} | |
if (preg_match("/iPhone/", $userAgent, $match)) { |
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
window.onerror = function(message, file, lineNumber) { | |
_gaq.push([ | |
'_trackEvent', | |
'error', | |
file + ':' + lineNumber, | |
message + '' | |
]); | |
}; |
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
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 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
window.onerror = function(message, url, linenumber) { | |
alert("JavaScript error: " + message + " on line " + linenumber + " for " + 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
<script> | |
var Obj = function(){ | |
var background = "#fff"; | |
var state = "on"; | |
this.change_state = function(){ | |
if(state === "on"){ | |
state = "off"; | |
background = "#000"; | |
} else { | |
state = "on"; |
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 | |
define('FOO', 1); | |
define('BAR', 2); | |
// 変数展開が「{$」で始まっている場合、関数の実行等が可能です。 | |
$c = 'constant'; | |
echo "FOO: {constant('FOO')}, BAR: {constant('BAR')}" . PHP_EOL; // => FOO: 1, BAR: 2 |
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
var wPat = "[a-zA-Z0-9-]"; // 英数字・ハイフン | |
wPat += "|[\u3041-\u3093]"; // ひらがな | |
wPat += "|[\u30A1-\u30F6]"; // カタカナ | |
wPat += "|[・ヽヾゝゞ々ー]"; // 記号 | |
wPat += "|[\u4E00-\u9FFF]"; //漢字 | |
wPat = "^(" + wPat +")+$"; | |
if (!str.match(wPat)) { | |
return false; | |
} |