Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="en-us">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Twitter / <%= reason.capitalize %></title>
<link href="//si0.twimg.com/sticky/error_pages/favicon.ico" rel="shortcut icon" type="image/x-icon">
<link rel="stylesheet" href="/errors/fullscreen_errors.css">
@ssig33
ssig33 / yosou.rb
Created June 25, 2012 08:16
ファーストサーバーの事故についてちょっと具体的に想像してみました
# ホットスタンバイがバックアップじゃないとかその手の話はとりあえず置いておきます
#
# なぜこんな間抜けな事故が起きたかについてだけ想像
#
# 1. いろんなサーバーメンテナンスをスクリプトでやっていた
# 2. スクトプトは随時使い回したり書き換えたりして使っていた
#
# という状態であったと推測する。中小規模自社サービスとかやってるところとかもわり
# とこうなんじゃないですかね。ホスティングでそのレベルでいい加減なのどうなんでし
# ょうか。
method1().method2(
1,
3,
4,
6,
7,
8
).method3(->
hoge()
huga()
require 'sinatra'
require 'thread'
require 'haml'
$q = Queue.new
Thread.start {
while r = $q.pop
system 'say -v Victoria pin pon'
end
try{
_window = new XPCNativeWrapper(content, "window");
_window = _window.wrappedJSObject
console.log = _window.console.log
}catch(e){
}
$(function(){
text = $('.cmn-article_title').first().text().slice(0,8);
url = "https://www.google.co.jp/search?hl=ja&gl=jp&tbm=nws&q="+encodeURIComponent(text);
location.href = url;
})
#coding:utf-8
def decode_dip str
str.gsub(/ピカァッ/, '-').gsub(/ピカッ/, '・')
end
def encode_dip str
str.gsub(/-/, 'ピカァッ').gsub(/・/, 'ピカッ')
end
@ssig33
ssig33 / pacuri.py
Created April 27, 2012 13:32
Tweet IRC Gateway で発言パクる
class PacuriCommand(TypableMapCommand): # {{{2
def __init__(self, manager, processor, msg, status, args):
TypableMapCommand.__init__(self, manager, processor, msg, status, args)
self.include_user = False
def process(self):
text = '%s ' % self.args if self.args else ''
user = ' @%s' % self.status.User.ScreenName if self.include_user else ''
url = self.shorten_url('http://twitter.com/%s/status/%s' % (self.status.User.ScreenName, self.status.Id))