天下一gitconfig大会(サイボウズ社内git勉強会@2012/11/20)の@teppeisの資料です。
- gistでmarkdown書いたらbookmarkletでプレゼンになるよ。
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use GD; | |
sub draw_page { | |
my ($width, $height) = @_; | |
return unless $width && $height; |
var fragment = document.createDocumentFragment(); | |
for (var i = 0; i < 10; i++) { | |
var child = document.createElement('div'); | |
// here | |
fragment.appendChild(child); | |
} | |
document.getElementById('parent').appendChild(fragment); |
var elem = document.createElement('div'), | |
text = document.createTextNode('Added div element.'); | |
document.body.appendChild(elem); | |
elem.appendChild(text); | |
var comment - document.createComment('This is comment.'); | |
document.body.insertBefore(comment, elem); |
//Array.prototype.slice() | |
var nodeList = decument.getElementsByTagname('span'); | |
alert(nodeList instanceof NodeList); // => true | |
alert(nodeList instanceof Array); // => false | |
var array = Array.prototype.slice.call(nodeList); | |
alert(array instanceof NodeList); // => false | |
alert(array instanceof Array); // => true |
<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Performance race</title> | |
</head> | |
<body> | |
<h1>Performance race: NodeList vs. Array</h1> | |
<p>Check the console.</p> | |
<div> |
<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Performance: NodeList vs. Array</title> | |
<script type="text/javascript"> | |
var result = document.evaluate( | |
// 1. <div> id == main | |
// 2. 3rd <p> class == content | |
// 3. <a> starts with href http://example.com/ |
bzip2: Compressed file ends unexpectedly; | |
perhaps it is corrupted? *Possible* reason follows. | |
bzip2: Undefined error: 0 | |
Input file = books.tar.bz2, output file = (stdout) | |
It is possible that the compressed file(s) have become corrupted. | |
You can use the -tvv option to test integrity of such files. | |
You can use the `bzip2recover' program to attempt to recover | |
data from undamaged sections of corrupted files. |
(function () { | |
"use strict"; | |
var ContentScripts = (function () { | |
function isBook(category) { | |
if (category.value === "books") { | |
return true; | |
} | |
return false; | |
} |
<a href="%URL%" target="_blank">%TITLE%</a><img src>"http://b.hatena.ne.jp/entry/image/%URL%" alt="%TITLE% - はてなブックマーク" title="%TITLE% - はてなブックマーク"> |