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
#!/bin/sh | |
cd /tmp | |
echo "Checking for update" | |
wget http://build.chromium.org/buildbot/snapshots/chromium-rel-mac/LATEST \ | |
-O chromium_rev | |
CUR=`cat chromium_rev` |
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
diff --git a/examples/tig.rb b/examples/tig.rb | |
index 7539609..2d597f5 100755 | |
--- a/examples/tig.rb | |
+++ b/examples/tig.rb | |
@@ -1736,7 +1736,8 @@ class TwitterIrcGateway < Net::IRC::Server::Session | |
r = [] | |
cursor = -1 | |
1.upto(limit) do |num| | |
- ret = api(path, { :cursor => cursor }, { :authenticate => authenticate }) | |
+ # next_cursor にアクセスするとNot found が返ってくることがあるので,その時はbreak |
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
# coding:utf-8 | |
from waveapi import events | |
from waveapi import model | |
from waveapi import robot | |
import re | |
import time | |
class Dispatcher(object): | |
def __init__(self, properties, context): |
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
>28+23 g| | |
^p32-1 <@ | |
g32<v!:<^ | |
v c^_, ^<> | |
>23g5%!v. | |
v"Buzz"_ | |
>23g3%!v | |
v"Fizz"_ | |
>" "23g>^ |
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; | |
use lib qw(./lib); | |
use Coro; | |
use Coro::Timer; | |
use Coro::Handle qw(unblock); | |
use Coro::LWP; | |
use LWP::UserAgent; |
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
* ホスト名につかえそうなもの | |
- 将軍の名前 | |
- ローマ皇帝の名前 | |
- ガンダムのモビルスーツの名前 | |
- 麻雀の役 | |
- 天使の名前 | |
- ある歌手の曲名 | |
- 二十八宿(http://ja.wikipedia.org/wiki/%E4%BA%8C%E5%8D%81%E5%85%AB%E5%AE%BF) | |
- 二十四節気 (http://ja.wikipedia.org/wiki/%E4%BA%8C%E5%8D%81%E5%9B%9B%E7%AF%80%E6%B0%97) | |
- 東海道の駅名 |
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 Applyer[-A, +B]( f :(A => B)) { | |
def apply(x:A) :B = { | |
this.f(x) | |
} | |
} | |
val a = new Applyer[String, int]( {x :AnyRef => x.hashCode} ) | |
println( | |
a.apply("hello") |
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
import scala.actors.Actor | |
import scala.actors.Actor._ | |
import scala.collection.mutable.ListBuffer | |
import scala.io.Source | |
import java.net._ | |
import java.io._ | |
object Fetcher { | |
var pathPrefix = "/tmp/" |
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; | |
use HTTP::Engine; | |
use HTTP::Engine::Response; | |
use YAML::Syck qw(Dump); | |
sub p { | |
print STDERR @_, "\n"; | |
} |
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
abstract class IntSet { | |
def incl(x: Int): IntSet | |
def contains(x: Int): Boolean | |
def traverse(f: Int => Unit): Unit | |
def union(other: IntSet): IntSet | |
def intersection(other: IntSet): IntSet | |
} | |
class EmptySet extends IntSet { | |
def contains(x: Int): Boolean = false |