This file contains hidden or 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
* 1: nobu 1870 | |
* 2: akr 716 | |
* 3: nagachika 488 | |
* 4: svn 449 | |
* 5: ko1 423 | |
* 6: naruse 339 | |
* 7: zzak 290 | |
* 8: usa 276 | |
* 9: kazu 149 | |
* 10: drbrain 114 |
This file contains hidden or 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
def score1(pins) | |
cursor = 0 | |
frame_points = [] | |
9.times do | |
frame_points << pins[cursor, 3] | |
cursor += 2 | |
if frame_points.last.first == 10 | |
cursor -= 1 | |
else | |
if frame_points.last.take(2).inject(:+) != 10 |
This file contains hidden or 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
#!/usr/bin/ruby | |
require 'pcap' | |
def cap_data(dev,filstr,count) | |
# [device],[snaplen],[promisc?],[read timeout(ms)] | |
pcaplet = Pcap::Capture.open_live(dev,1460,true,1000) | |
access = Pcap::Filter.new(filstr,pcaplet) | |
pcaplet.setfilter(access) |
This file contains hidden or 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
#! /usr/bin/ruby | |
require "rubygems" | |
require 'oauth' | |
require 'rubytter' | |
require 'rss/1.0' | |
require 'open-uri' | |
# 設定ファイルをロードする |