Skip to content

Instantly share code, notes, and snippets.

View tasuten's full-sized avatar
🛏️
out sick for a few years

tasuten tasuten

🛏️
out sick for a few years
View GitHub Profile
@tasuten
tasuten / deps.rb
Last active November 30, 2015 23:17
brewのパッケージの依存関係をDOT言語で出力
#!/usr/bin/env ruby
# encoding : utf-8
# 使い方
# $ ./deps.rb > deps.dot
# Graphvizで出力
# $ dot -Tpng deps.dot -o deps.png
# deps.pngを開く
# 図の見方として
@tasuten
tasuten / fizzbuzz.scm
Last active January 1, 2016 20:49
書き初め@2014
#!/usr/local/bin/gosh
(define (main args)
(print (map fizzbuzz (iota 2014 1)))
0 )
(define (dividable x y)
(zero? (mod x y)))
(define (fizzbuzz x)
(cond
@tasuten
tasuten / hello.rb
Created September 20, 2013 18:37
挑戦者求む!【言語指定】Restricted Words by @cielavenir cielavenir│CodeIQ https://codeiq.jp/ace/cielavenir/q431 の私の回答です。
#!/usr/bin/env ruby
# encoding : utf-8
# Timeの現在時刻のUNIXタイムから、まず0と1を作る
time = Time.now.to_i
zero = time
one = time
if time.zero?
# zero = time
@tasuten
tasuten / rpncalc.rb
Created July 1, 2012 12:42
Reverse Polish Notation Calc by Ruby
#!/usr/bin/env ruby
# encoding : utf-8
# Complexクラスは1.9.xでは組み込みクラスになった
# require 'complex'
include Math
ONE_ARG_FUNCS = %w(sin cos tan asin acos atan sinh cosh tanh asinh acosh atanh exp log log10 log2 sqrt)
stack = []