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 number2alphabet($instr) { | |
$alphabettbl = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'); | |
$outstr = ''; | |
$len = strlen($instr); | |
for ($i = 0; $i < $len; $i++) { | |
$char = substr($instr, $i, 1); | |
if(is_numeric($char)){ | |
$outstr .= $alphabettbl[$char]; | |
}else{ | |
$outstr .= $char; |
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
Option Explicit | |
On Error Resume Next | |
Dim objWshShell | |
Dim objFSO | |
Dim objFile | |
Set objWshShell = WScript.CreateObject("WScript.Shell") | |
Set objFSO = WScript.CreateObject("Scripting.FileSystemObject") |
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
"^ " | |
=~ ( | |
("(").("~"^"."^"^"^(""=="")."").("^" | |
^"="^(""=="").""^")").("^"^".").("=" | |
^"~"^(""=="")."").("("^(""=="^").""^ | |
"."^"^").("("^(""=="").""^"^"^")").( | |
(" ^( " | |
== " | |
") . | |
"" ^ |
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 getPageTitle($url) { | |
$html = @file_get_contents($url); | |
$html = mb_convert_encoding($html, 'UTF-8', 'auto'); | |
if ( preg_match( "/<title>(.*?)<\/title>/i", $html, $matches) ) { | |
return $matches[1]; | |
} else { | |
return false; | |
} | |
} |
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 | |
var_dump(empty('test')); |
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 ezXMLParser = {}; | |
ezXMLParser.splitXML = function(XMLstr) { | |
var ret = new Array(); | |
for(var count = 0; ezXMLParser.isExistStrictXML(XMLstr); count++){ | |
// | |
var xml_end_char_index = XMLstr.indexOf('>'); | |
var xml_start_char_index = XMLstr.indexOf('<'); | |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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 | |
while(true){ | |
if ($handle = opendir('./')) { | |
/* ディレクトリをループする際の正しい方法です */ | |
while (false !== ($file = readdir($handle))) { | |
if(endWith($file, '.txt')) { | |
printComment($file); | |
} | |
} |
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 | |
/* | |
See: http://rocketnews24.com/2012/04/26/207346/ | |
INPUT: 7H15 M3554G3 53RV35 7O PR0V3 H0W 0UR M1ND5 C4N D0 4M4Z1NG 7H1NG5! 1MPR3551V3 7H1NG5! 1N 7H3 B3G1NN1NG 17 WA5 H4RD BU7 N0W, 0N 7H15 LIN3 Y0UR M1ND 1S R34D1NG 17 4U70M471C4LLY W17H0U7 3V3N 7H1NK1NG 4B0U7 17, B3 PROUD! 0NLY C3R741N P30PL3 C4N R3AD 7H15. R3 P057 1F U C4N R34D 7H15. | |
OUTPUT: THIS MESSAGE SERVES TO PROVE HOW OUR MINDS CAN DO AMAZING THINGS! IMPRESSIVE THINGS! IN THE BEGINNING IT WAS HARD BUT NOW, ON THIS LINE YOUR MIND IS READING IT AUTOMATICALLY WITHOUT EVEN THINKING ABOUT IT, BE PROUD! ONLY CERTAIN PEOPLE CAN READ THIS. RE POST IF U CAN READ THIS. | |
*/ | |
$subject = trim(fgets(STDIN)); | |
$search = array('0', '1', '3', '4', '5', '7'); |
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('NICONICO_MAILADDRESS', '<アカウントアドレス>'); | |
define('NICONICO_PASSWORD' , '<アカウントパスワード>'); | |
$id = @$argv[1]; | |
if(!$id) exit('Usage (sm|lv)[\d]+'.PHP_EOL); | |
if(strpos($id, 'sm') === 0) getVideoComment($id); | |
if(strpos($id, 'lv') === 0) getLiveComment($id); | |
if(strpos($id, 'co') === 0) getLiveComment($id); |
OlderNewer