Skip to content

Instantly share code, notes, and snippets.

#!/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`
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
# 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):
>28+23 g|
^p32-1 <@
g32<v!:<^
v c^_, ^<>
>23g5%!v.
v"Buzz"_
>23g3%!v
v"Fizz"_
>" "23g>^
use strict;
use warnings;
use lib qw(./lib);
use Coro;
use Coro::Timer;
use Coro::Handle qw(unblock);
use Coro::LWP;
use LWP::UserAgent;
* ホスト名につかえそうなもの
- 将軍の名前
- ローマ皇帝の名前
- ガンダムのモビルスーツの名前
- 麻雀の役
- 天使の名前
- ある歌手の曲名
- 二十八宿(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)
- 東海道の駅名
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")
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/"
use strict;
use warnings;
use HTTP::Engine;
use HTTP::Engine::Response;
use YAML::Syck qw(Dump);
sub p {
print STDERR @_, "\n";
}
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