Skip to content

Instantly share code, notes, and snippets.

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'
@Oneiroi
Oneiroi / wordpress_importer.rb
Created February 9, 2012 17:41 — forked from stammy/wordpress_importer.rb
Import a WordPress database and generate markdown files for Jekyll
# 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'
@elvanja
elvanja / deploy_discourse_to_heroku
Last active March 20, 2017 08:01
Helps deploy Discourse to Heroku with: * local asset precompiling * RedisCloud add-on * Autoscaler with Sidekiq add-on Details @ http://shcatula.wordpress.com/2013/07/08/deploying-discourse-to-heroku
#!/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
@ryandotsmith
ryandotsmith / hack-reactor.md
Last active November 24, 2022 07:01
Hack Reactor Talk

Tales From a Heroku User

Here are some things I have learned along the way.

Last Updated: 2013-02-08

Original Audience: Hack Reactor

About