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 | |
if(!array_key_exists("q", $_GET)) exit("no query"); | |
$ch = curl_init(); | |
curl_setopt_array($ch, [ | |
CURLOPT_RETURNTRANSFER => true, | |
CURLOPT_SSL_VERIFYPEER => false, | |
CURLOPT_URL => "https://twitter.com/i/search/timeline?" . http_build_query([ | |
"q" => $q = $_GET["q"], | |
"src" => "typd", |
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
javascript:(function(a,c){var b=a("#ctl00_ContentPlaceHolder1_ctl00_div tr");1>=b.size()&&(b=a("#ctl00_ContentPlaceHolder1_div tr"));b.find("td:eq(5)").each(function(){c(this.textContent)||(this.textContent=100,a(this).parent().find("td").css("background-color","white"))}).end().find("td:eq(6)").each(function(){c(this.textContent)||(this.textContent=4.5)})})(jQuery,isNaN); | |
/* | |
(function($,isNaN){ | |
let $e = $("#ctl00_ContentPlaceHolder1_ctl00_div tr"); | |
if($e.size() <= 1){ | |
$e = $("#ctl00_ContentPlaceHolder1_div tr"); | |
} | |
$e.find("td:eq(5)").each(function(){ | |
if(!isNaN(this.textContent)){ |
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
(function(a){a("a[univ_id=7]").on("click",function(){a.cookie("gd",parseInt(new Date/1E3));a.cookie("gsu","12",{path:"/"});a.cookie("gsuh","012d30347a0b1899d07967b2c9688485",{path:"/"})})})(jQuery); | |
/* | |
(function($){ | |
$("a[univ_id=7]").on("click", function(){ | |
$.cookie("gd", parseInt(new Date/1000)); | |
$.cookie("gsu", "12", {path: "/"}); | |
$.cookie("gsuh", "012d30347a0b1899d07967b2c9688485", {path: "/"}); | |
}); | |
})(jQuery); |
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
var fs = require("fs"); | |
var page = require("webpage").create(); | |
page.open("http://www.adventar.org/calendars/1183", function(){ | |
page.clipRect = page.evaluate(function(){ | |
return document.querySelector(".mod-calendar").getBoundingClientRect(); | |
}); | |
fs.remove("calendar.png"); | |
page.render("calendar.png"); | |
phantom.exit(); | |
}); |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<style> | |
* { | |
margin: 0; | |
padding: 0; | |
} | |
#container { |
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 | |
$url = $_SERVER["QUERY_STRING"]; | |
if(preg_match("@^http://(.+?)\.(.+?)/@", $url, $m)){ | |
if($m[1] === "www" && $m[2] === "nicovideo.jp"){ | |
header("HTTP/1.1 301 Moved Permanently"); | |
header("Location: {$url}"); | |
}else if($m[2] === "nicovideo.jp" || $m[2] === "nimg.jp" || $m[2] === "smilevideo.jp"){ | |
$hash = md5($url); | |
if(file_exists("{$hash}.content") && file_exists("{$hash}.type")){ | |
$content = file_get_contents("{$hash}.content"); |
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 | |
$db = new PDO("sqlite:deka.db"); | |
$account = [[], [], [], []]; | |
foreach($db->query("SELECT * FROM Account")->fetchAll(PDO::FETCH_ASSOC) as $deka){ | |
$account[strlen($deka["ID"]) - 5][] = $deka; | |
} | |
foreach($account as &$e){ | |
sort($e); | |
} |
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
openssl genrsa 2048 > key.pem | |
openssl req -new -key key.pem > req.pem | |
openssl x509 -days 65536 -req -signkey key.pem < req.pem > cert.pem |
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
use strict; | |
# MT19937 | |
my $w = 32; | |
my $n = 624; | |
my $m = 397; | |
my $r = 31; | |
my $u = 11; | |
my $s = 7; | |
my $t = 15; |
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 | |
class SimpleClient { | |
private $cookies = []; | |
public function get($url){ | |
return $this->request("GET", $url, null); | |
} | |
public function post($url, $param){ | |
return $this->request("POST", $url, $param); | |
} |
OlderNewer