Skip to content

Instantly share code, notes, and snippets.

View hority's full-sized avatar

hority hority

View GitHub Profile
@hority
hority / sosutwit.rb
Last active December 21, 2015 00:08 — forked from sasamijp/sosutwit.rb
# -*- encoding: utf-8 -*-
require 'rubygems'
require 'twitter'
class Integer
def prime?
n = self.abs()
return true if n == 2
return false if n == 1 || n & 1 == 0
d = n-1