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 f(n) { | |
setTimeout(function () { alert(n + ' in f') }, 0); | |
return n; | |
} | |
function g() { | |
alert(f('1')); | |
alert('2'); | |
alert('3'); | |
} |
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
class Stone | |
@@STONE_COLORS = [:white, :black] | |
def initialize(heads_color) | |
raise "Invalid type" unless @@STONE_COLORS.include?(heads_color) | |
@heads = heads_color | |
end | |
attr_reader :heads # 表の色 | |
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; | |
use warnings; | |
package Puu; | |
use base qw( Class::Accessor::Lvalue::Fast); | |
__PACKAGE__->mk_accessors(qw(nyo nyu)); | |
package main; | |
use Data::Dumper; | |
use Perl6::Say; |
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
hi Pmenu ctermbg=8 | |
hi PmenuSel ctermbg=12 | |
hi PmenuSbar ctermbg=0 |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
#define MAX_INPUT_SIZE 1024 | |
#define TK_NOTHING 0 | |
#define TK_NUM 1 | |
#define TK_OP_PLUS 10 | |
#define TK_OP_MINUS 11 |
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
// ==UserScript== | |
// @name replace_ritsboy | |
// @namespace jp.hakobe.gm | |
// @include http://twitter.com/.* | |
// ==/UserScript== | |
var nodes = document.getElementsByClassName('status-body'); | |
for (var i in nodes) { | |
var node = nodes[i].childNodes[1].childNodes[1].firstChild; |
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
// bbeta のお気に入りから自分がブックマークしてるエントリを消す | |
var list = Ten.Selector.getElementsBySelector('ul#bookmarked_user li'); | |
for (var i = 0; i < list.length; i++) { | |
var elem = list[i]; | |
var mine = Ten.Selector.getElementsBySelector('ul.comment li.mine', elem); | |
if (mine) { elem.style.display = 'none' } | |
} |
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
pbpaste | perl -p -e 's/&/&/g; s/</</g; s/>/>/g; s/\"/"/g' |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use File::Modified; | |
use Perl6::Say; | |
my ($command, @files) = @ARGV; | |
my $watcher = File::Modified->new( | |
method => 'mtime', |
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
// ==UserScript== | |
// @name hamnize | |
// @namespace jp.hakobe.gm | |
// @include http://bacolicio.us/* | |
// ==/UserScript== | |
var overlay = document.getElementById('overlay'); | |
overlay.style.top = '8%'; | |
overlay.style.left = '10%'; | |
overlay.firstChild.src = 'http://img.f.hatena.ne.jp/images/fotolife/h/hakobe932/20081222/20081222165715_original.png' |