Skip to content

Instantly share code, notes, and snippets.

View yuroyoro's full-sized avatar
🍣
🍣

しいたけ yuroyoro

🍣
🍣
View GitHub Profile

2014年11月 発動!渾作戦

消費資材総計

- 燃料 弾薬 鋼材 ボーキ バケツ
E1 1942 2108 814 632 14
E2 -559 -56 -306 -886 2
E3 3439 2649 1310 1292 12
next
艦種 艦名 Lv con Hp Exp
@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"
}
@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 / 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

E1

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

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

@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]
@yuroyoro
yuroyoro / noda.hs
Created December 3, 2013 04:43
社長令嬢の新人女子プログラマ野田さんにHaskell教えてみた 新人女子プログラマの書いたコードを直すだけの簡単なお仕事です!|paizaオンラインハッカソンVol.1 https://paiza.jp/poh/ec-campaign Arrowとか使えばもっときれいに書けそうな気がするがここが限界です……
{-
新人女子プログラマの書いたコードを直すだけの簡単なお仕事です!|paizaオンラインハッカソンVol.1 https://paiza.jp/poh/ec-campaign
-}
import Data.List
import Data.Maybe
main = do cs <- getContents
putStr $ unlines $ (map show) $ parse $ lines cs
parse :: [String] -> [Int]
parse ls = map (findBestPrice prices) goals

E5戦闘記録

- 燃料 鋼材 弾薬 ボーキ バケツ
26974 29695 41687 32247 189
9425 14412 25157 30904 77
消費 17549 15283 16530 1343 112
no 判定 ボス泥 ゲージ