draft for new post about register allocation

This commit is contained in:
2020-03-22 22:50:24 +02:00
parent 760690718a
commit ab9365f423
3 changed files with 160 additions and 0 deletions

View File

@ -4,3 +4,17 @@
require_relative 'config/application'
Rails.application.load_tasks
task :create_post do
args = ARGV.dup
args.shift
args.each { |a| task a.to_sym do ; end }
today = Time.now
args.unshift today.day.to_s.rjust(2 , "0")
args.unshift today.month.to_s.rjust(2 , "0")
file = "app/views/posts/#{today.year}/_" + args.join("-") + ".haml"
f = File.open(file , "w")
f << "%p start"
end