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 lang="ja"> | |
<head> | |
<title>File API</title> | |
<meta charset="UTF-8"> | |
</head> | |
<body> | |
<h1>File API</h1> | |
<div id="result">使用できない</div> | |
<script> |
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 | |
class A { | |
protected static $_a = 'a'; | |
public static function get() { | |
return self::$_a; | |
} | |
} | |
var_dump(A::get()); // a |
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 Buffer = require('buffer').Buffer; | |
var Iconv = require('iconv').Iconv; | |
var iconv = new Iconv('cp932', 'UTF-8'); | |
console.log(iconv.convert(new Buffer('こんにちは', 'binary')).toString()); |
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
// ==UserScript== | |
// @name test | |
// @namespace http://example.com/test | |
// @include http://* | |
// ==/UserScript== | |
(function () { | |
var elIcon = document.createElement('link'); | |
elIcon.setAttribute('rel', 'shortcut icon'); | |
elIcon.setAttribute('href', 'http://example.jp/favicon.ico'); |
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
// ==UserScript== | |
// @name tiqav dev | |
// @namespace http://dev.tiqav.com/userscripts/tiqav_dev.user.js | |
// @include http://localhost:3000/* | |
// ==/UserScript== | |
(function () { | |
var node, imgList = document.getElementsByTagName('img'); | |
for (var i = 0, len = imgList.length; i < len; ++i) { | |
node = imgList.item(i); | |
var src = node.getAttribute('src'); |
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
NodeList.prototype.forEach = function (fun, thisp) { | |
return Array.prototype.forEach.call(this, fun, thisp); | |
}; |
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
NodeList.prototype.forEach = function (fun, thisp) { | |
return Array.prototype.forEach.call(this, fun, thisp); | |
}; | |
var elems = document.getElementsByTagName('*'); | |
elems.forEach(function (node, index, nodeList) { | |
console.log(node, index); | |
}); |
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 elems = document.getElementsByTagName('*'); | |
Array.prototype.forEach.call(elems, function (node, index, nodeList) { | |
console.log(node, index); | |
}); |
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>STAR - Canvas</title> | |
</head> | |
<body> | |
<canvas id="star" width="12px" height="11px"></canvas> | |
</body> | |
<script><!-- | |
var canvas = document.getElementById('star'); |
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 timestamp() { | |
echo time(); | |
} | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
</head> | |
<body> |