Skip to content

Instantly share code, notes, and snippets.

あかぎたかし majosystems

Block or report user

Report or block majosystems

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@majosystems
majosystems / auto_clear_and_backup
Created Jan 9, 2015
デスクトップやダウンロードのファイル整理用
View auto_clear_and_backup
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 Aug 29, 2015
a-blog cms フォームサンプル
View acms_form.html
<!-- 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" />
View roman.rb
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|
You can’t perform that action at this time.