Skip to content

Instantly share code, notes, and snippets.

Marc Hadley hadleynet

Block or report user

Report or block hadleynet

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
View gist:29163d57cc75f7300bf5
Verifying that +hadleynet is my blockchain ID. https://onename.com/hadleynet
@hadleynet
hadleynet / gm2jekyll.rb
Created Nov 23, 2014
Ruby script to convert Greymatter blog entries to Jekyll post format
View gm2jekyll.rb
#!/usr/bin/env ruby
source_dir = ARGV[0]
dest_dir = ARGV[1]
def get_timestamp(components)
month = components[0].to_i
day = components[1].to_i
year = components[2].to_i
hour = components[3].to_i
minute = components[4].to_i
@hadleynet
hadleynet / Rakefile
Created Nov 23, 2014
Rakefile to migrate Bloxsom weblog entries to Jekyll
View Rakefile
require 'pathname'
task :bloxsom, [:post_dir, :dest_dir] do |t, args|
Dir.glob(File.join(args[:post_dir], "**/*.txt")).each do |path|
time_stamp = File.stat(path).mtime
relative_path = Pathname.new(path).relative_path_from(Pathname.new(args[:post_dir]))
tags = File.dirname(relative_path).split('/')
tags.delete('.')
content = File.readlines(path)
title = content[0].chomp
You can’t perform that action at this time.