Skip to content

Instantly share code, notes, and snippets.

@rjjq
rjjq / aidc2aidu.rb
Last active September 15, 2019 02:57
ruby - aidc2aidu
@aidTable = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_"
def aidc2aidu(aid)
aidu = 0
aid.split('').each do |c|
break if c == "@"
if v = @aidTable.index(c)
# aidu = aidu << 6
# aidu = aidu | (v & 0x3f)
@rjjq
rjjq / csv2table.rb
Created August 17, 2016 03:50 — forked from komasaru/csv2table.rb
Ruby script to convert a csv file to html table tags.
#= CSV -> table 変換
# :CSV ファイルを table タグに変換する
# 第1引数:変換対象の CSV ファイル名
# 第2引数:align を c,l,l,r,r,l のように指定(省略可、デフォルトは "l")
#---------------------------------------------------------------------------------
#++
require 'csv'
# [CLASS] 引数
class Arg