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
//ブックマークレット | |
javascript:(function(){ | |
var s=document.createElement("script"); | |
s.src="http://rskull.com/src/rori.js"; | |
document.body.appendChild(s)})(); | |
//ロリロリ変換本体 | |
var i = 0; | |
var box = document.createElement("div"); | |
box.style.fontSize = '40px'; |
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 now = new Date(); | |
var y = now.getFullYear(); // 年 | |
var mo = now.getMonth() + 1; // 月 | |
var d = now.getDate(); // 日 | |
var h = now.getHours(); // 時 | |
var m = now.getMinutes(); // 分 | |
var s = now.getSeconds(); // 秒 | |
//imgオブジェクト作成 |
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 lastday () { | |
var now = new Date(); | |
var y = now.getFullYear(); | |
var m = now.getMonth(); | |
for (i=27;i<=32;i++) { | |
var check = new Date(y, m, i); | |
if (check.getMonth() != m) { | |
return i - 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
<?php | |
//cronでまわす | |
mb_language('Japanese'); | |
mb_internal_encoding('UTF-8'); | |
//RSS取得 東京 | |
$xml_file = 'http://rss.weather.yahoo.co.jp/rss/days/13.xml'; | |
$xml = simplexml_load_file($xml_file); | |
$res = $xml -> channel -> item[0] -> title; |
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 | |
function randstr ($len) { | |
$list = 'abcdifghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'; | |
$ls = str_split($list); | |
for ($i=0;$i<$len;$i++) { | |
$token .= $ls[mt_rand(0, 62)]; | |
} | |
return $token; | |
} |
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
//ブックマークレット | |
javascript:(function () { | |
var form = document.forms; | |
for (i=0;i<form.length;i++) { | |
var elem = form[i].elements; | |
for (j=0;j<elem.length;j++) { | |
if (elem[j].type == 'password') { | |
elem[j].type = 'type'; | |
} | |
} |
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 | |
//RSSを取得してキャッシュする。 | |
function getxml ($url, $path, $timer) { | |
$file_load = true; | |
//チャージしたRSSファイルの鮮度チェック | |
if (file_exists($path)) { | |
$mt = filemtime($path); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>I LOVE YOU</title> | |
<script> | |
onload = function () { | |
var d = document; | |
// フェードイン | |
function feedin (feed, speed) { | |
var filter = 0; |
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
//選択した範囲をツイート欄にセットする。 | |
javascript:(function () { | |
var d = document; | |
var t = d.getSelection(); | |
var l = d.links; | |
var u = ''; | |
for (i=0;i<l.length;i++) { | |
if (l[i].innerHTML == t) { | |
u = l[i].href; | |
} |
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 | |
$token = md5(uniqid(mt_rand(), true)); |