Donate to support Ukraine's independence.

14 Jun'13

Moving from Jekyll to Octopress

Hi again. Today I can proudly say that I was productively procrastinating! As you might know, my “Deep dive into Linux” journey has just began and today it saved me at least few hours.

While cleaning up my 1TB drive residing inside my desktop to make sure that all junk is removed whereas all important files are properly backed up to the cloud, I noticed that inside my old website folder there were at least 7 backup archives which were almost identical. They were consuming a lot of space and since going to the university I’ve being actively using …

Continue reading

14 Jun'13

mkpost for Jekyll

In order to speedup post creation, I found and improved a simple Ruby script:

#!/usr/bin/ruby
require 'date'
require 'time'

puts 'What would you like to write about?'
article_title = gets
slug = article_title.downcase.strip.gsub(' ', '-')

current_date = Date.today.to_s
current_time = Time.now

filename = current_date + '-' + slug + '.md'

File.open("_posts/"+filename, "w") do |post|
 post.write("---\n")
 post.write("layout: post\n")
 post.write("title: #{article_title}")
 post.write("date: #{current_time}\n")
 post.write("---")
end

puts 'Created new file here: _/posts/'+filename

# fire up sublime text
system("subl '_posts/#{filename}' &")

Continue reading

Category: