Skip to content

Instantly share code, notes, and snippets.

View yuroyoro's full-sized avatar
🍣
🍣

しいたけ yuroyoro

🍣
🍣
View GitHub Profile
@yuroyoro
yuroyoro / exception_print_backtrace.rb
Last active August 29, 2015 13:56
print exception.backtrace.join("\n")と書くのに疲れた人へ
# -*- encoding : utf-8 -*-
class Exception
def print_backtrace(options = {:out => $stderr, :filters => []})
out = options[:out] || $stderr
filters = options[:filters]
filters = filters.nil? ? [] :
filters.respond_to?(:to_ary) ? filters.to_ary :
[filters]

E1

- 燃料 弾薬 鋼材 ボーキ バケツ
73713 77342 89982 82623 660
71968 76608 88175 81790 642
消費 1745 734 1807 833 18

|no | ルート | 判定 | ボス泥 | 備考 |

@yuroyoro
yuroyoro / riak.sh
Last active August 29, 2015 14:01 — forked from iotaweb/riak.sh
#!/bin/sh
CWD=$(cd $(dirname $0); pwd)
echo "This script will create a local riak cluster for development purposes only."
echo "Prerequisites: install riak using homebrew (tested with v1.4.8)."
echo "The cluster will be created in the current directory."
echo "Riak admin is enabled with no security.\n"
read -p "Enter a name for your cluster [cluster]: " name
@yuroyoro
yuroyoro / chat-osx.css
Created September 5, 2014 07:07
HipCahtのcssをアレした( ꒪⌓꒪)
/* /Applications/HipChat.app/Contents/Resources/chat-osx.css */
p, div {
font-family: Helvetica;
}
p, div, .nameBlock p, .messageBlock p, .messageBlock div, .messageBlock pre {
/* These are %-based to enable text size scaling options. The default text size is defined
by a function on the WebPreferences object */
font-size: 100%;
@yuroyoro
yuroyoro / resume_transaction.rb
Created September 18, 2014 07:32
Fiber使って、ActiveRecord::Base.transactionのblcok内でyieldして、beginとcommit/rollbackを別々の場所で実行するヤツ
fiber = Fiber.new {|commit|
puts "fiber start"
ActiveRecord::Base.transaction {
puts "begin"
Fiber.yield
raise ActiveRecord::Rollback unless commit
puts "commit"
}
puts "fiber end"
}
next
艦種 艦名 Lv con Hp Exp

2014年11月 発動!渾作戦

消費資材総計

- 燃料 弾薬 鋼材 ボーキ バケツ
E1 1942 2108 814 632 14
E2 -559 -56 -306 -886 2
E3 3439 2649 1310 1292 12
@yuroyoro
yuroyoro / client.go
Created December 17, 2014 09:28
GoでHTTP/2 最速実装 v3
/*
GoでHTTP/2 最速実装 v3
参考:
[HTTP/2 最速実装 v3 // Speaker Deck](https://speakerdeck.com/syucream/2-zui-su-shi-zhuang-v3)
[syucream/MinimumHTTP2](https://github.com/syucream/MinimumHTTP2)
[Hypertext Transfer Protocol version 2 (draft-ietf-httpbis-http2-14) 日本語訳](http://summerwind.jp/docs/draft-ietf-httpbis-http2-14/#section4-3)
[Jxck/http2](https://github.com/Jxck/http2)

2015年2月 迎撃!トラック泊地強襲

消費資材総計

- 燃料 弾薬 鋼材 ボーキ バケツ
E1 284 -423 -524 -38 1
E2 5431 4296 6608 1099 32
E3 2115 1411 1315 980 22