Skip to content

Instantly share code, notes, and snippets.

View majosystems's full-sized avatar

あかぎたかし majosystems

  • MajoSystems まよしすてむず
  • 日本国 愛媛県松山市
View GitHub Profile
@majosystems
majosystems / auto_clear_and_backup
Created January 9, 2015 03:21
デスクトップやダウンロードのファイル整理用
to zero_pad(num, slength)
set maxlnum to "0000000000" & (num as text)
set ret_str to text ((length of maxlnum) - (slength - 1)) thru -1 of maxlnum
return ret_str
end zero_pad
to datef(d)
set yyyy to zero_pad(year of d, 4)
set mm to zero_pad(month of d as number, 2)
@majosystems
majosystems / acms_form.html
Last active August 29, 2015 14:10
a-blog cms フォームサンプル
<!-- BEGIN_MODULE Form -->
<!-- BEGIN step -->
<form action="?step=reapply" method="post">
メールアドレス:<input type="text" name="email" value="" /><br />
お名前:<input type="text" name="name" value="" /><br />
連絡内容:<textarea name="message"></textarea><br />
<input type="hidden" name="field[]" value="email" />
<input type="hidden" name="email:v#required" />
<input type="hidden" name="field[]" value="name" />
class Integer
def roman(s=self)
return "-" if 3999 < s
v = 1
r = {1 => 'I', 4 => 'IV', 5 => 'V', 9=> 'IX', 10 => 'X',
40 => 'XL', 50 => 'L', 90 => 'XC', 100 => 'C', 400 => 'CD',
500 => 'D', 900=> 'CM', 1000 => 'M', 9999 => "" }
r.keys.sort.each{|k|