Skip to content

Instantly share code, notes, and snippets.

@dmshvetsov
dmshvetsov / seed.rb
Last active June 1, 2019 15:29
How to seed your database with JSON/YAML. Source http://snippets.aktagon.com
json = ActiveSupport::JSON.decode(File.read('db/seeds/countries.json'))
json.each do |a|
Country.create!(a['country'], without_protection: true)
end
@justinkelly
justinkelly / _config.yml
Created March 21, 2012 01:17
Update posterous migrator for jekyll/octopress that maintains url slug
# To maintain your posterous links use the below permalink config
# ----------------------- #
# Jekyll & Plugins #
# ----------------------- #
permalink: /:title/