Skip to content

Instantly share code, notes, and snippets.

View siman-man's full-sized avatar
🌴
On vacation

Shuichi Tamayose siman-man

🌴
On vacation
  • Japan
View GitHub Profile
@siman-man
siman-man / gist:5459790
Created April 25, 2013 13:44
57文字まで減ったので記念( ARC003 A問題 )
s,n=-59,gets.to_f
gets.each_byte{|v|v<70&&s+=69-v}
p s/n
n=gets.split;b=gets.split;s=gets.split
p "00054312"[(t=(n&s).size;t+=t==5?(b&s).size*2:0)].to_i
@siman-man
siman-man / gist:5590869
Created May 16, 2013 10:47
loto6当選データ
第1回,2,8,10,13,27,30
第2回,1,9,16,20,21,43
第3回,1,5,15,31,36,38
第4回,16,18,26,27,34,40
第5回,9,15,21,23,27,28
第6回,6,12,23,25,28,38
第7回,7,19,21,23,33,35
第8回,11,16,18,20,42,43
第9回,11,19,23,38,39,42
第10回,1,3,19,21,35,39
@siman-man
siman-man / gist:5822110
Created June 20, 2013 11:47
Growlテスト
require 'nokogiri'
require 'ruby-growl'
require 'ruby-growl/ruby_logo'
require 'open-uri'
require 'pp'
require 'kconv'
g = Growl::GNTP.new "localhost", "ruby-growl"
g.add_notification("notification", "ruby-growl Notification",
Growl::RUBY_LOGO_PNG)
//
// ViewController.m
// NSUserDefault
//
// Created by siman on 2013/11/13.
// Copyright (c) 2013年 siman. All rights reserved.
//
#import "ValueViewController.h"
#import "ViewController.h"
//
// ViewController.h
// NSUserDefault
//
// Created by siman on 2013/11/13.
// Copyright (c) 2013年 siman. All rights reserved.
//
#import <UIKit/UIKit.h>
//
// ValueViewController.m
// NSUserDefault
//
// Created by siman on 2013/11/13.
// Copyright (c) 2013年 siman. All rights reserved.
//
#import "ValueViewController.h"
//
// ValueViewController.h
// NSUserDefault
//
// Created by siman on 2013/11/13.
// Copyright (c) 2013年 siman. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "ViewController.h"
#import "FMDatabase.h"
@interface ViewController ()
@end
@implementation ViewController
def test(str)
puts str
end
test(<<EOS)
Hello World.
This is a pen.
これはテストです
EOS