Here are some things I have learned along the way.
Last Updated: 2013-02-08
Original Audience: Hack Reactor
merb : worker (port 4000) ~ undefined method `closed?' for nil:NilClass - (NoMethodError) | |
/usr/lib/ruby/1.8/net/http.rb:1060:in `request' | |
/usr/share/chef-server-api/lib/../../chef-solr/lib/chef/solr.rb:58:in `solr_select' | |
/usr/share/chef-server-api/lib/../../chef-solr/lib/chef/solr/query.rb:63:in `raw' | |
/usr/share/chef-server-api/lib/../../chef-solr/lib/chef/solr/query.rb:84:in `search' | |
/usr/share/chef-server-api/app/controllers/search.rb:48:in `show' | |
/usr/lib/ruby/1.8/merb-core/controller/abstract_controller.rb:315:in `send' | |
/usr/lib/ruby/1.8/merb-core/controller/abstract_controller.rb:315:in `_call_action' | |
/usr/lib/ruby/1.8/merb-core/controller/abstract_controller.rb:289:in `_dispatch' | |
/usr/lib/ruby/1.8/merb-core/controller/merb_controller.rb:252:in `_dispatch' |
# based on the import script by icebreaker, which is based on mojombo's | |
# https://github.com/mojombo/jekyll/blob/master/lib/jekyll/migrators/wordpress.rb | |
# https://gist.github.com/303570 | |
# edited to rewrite image URLs to use my CloudFront URL | |
require 'rubygems' | |
require 'sequel' | |
require 'fileutils' | |
require 'yaml' |
Here are some things I have learned along the way.
Last Updated: 2013-02-08
Original Audience: Hack Reactor
#!/bin/sh | |
# http://stackoverflow.com/questions/3878624/how-do-i-programmatically-determine-if-there-are-uncommited-changes | |
require_clean_work_tree () { | |
# Update the index | |
git update-index -q --ignore-submodules --refresh | |
err=0 | |
# Disallow unstaged changes in the working tree | |
if ! git diff-files --quiet --ignore-submodules --; then |