This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def patiently(&block) | |
cycles = 0 | |
begin | |
yield | |
rescue => e | |
cycles += 1 | |
sleep 0.1 | |
if cycles < 10 | |
retry | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'syntax/convertors/html' | |
require 'uv' | |
module Code | |
BACKGROUND_COLOR = '#2B2B2B' | |
COLOR = '#E6E1DC' | |
COLORS = { | |
:keyword => '#CC7833', | |
:symbol => '#6E9CBE', | |
:constant => '#DA4939', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module RackHeaderHack | |
def set_headers(headers) | |
driver = page.driver | |
def driver.env | |
@env.merge(super) | |
end | |
def driver.env=(env) | |
@env = env | |
end | |
driver.env = headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"twitter" : "klickmich", | |
"github" : "martinrehfeld", | |
"blog" : "http://inside.glnetworks.de", | |
"email" : "martin.rehfeld@glnetworks.de", | |
"location" : "Germany/Berlin" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'culerity' | |
$env_javascript_tag = ENV['CULERITY_JAVASCRIPT_TAG'] || '@javascript' | |
def set_jruby_env | |
rvm_jruby = ENV['CULERITY_RVM_JRUBY'] || 'jruby' | |
info = `rvm info #{rvm_jruby}` | |
gem_home = info =~ /GEM_HOME:\s?"([^"]*)"/ ? $1 : '' | |
gem_path = info =~ /GEM_PATH:\s?"([^"]*)"/ ? $1 : '' | |
my_ruby_home = info =~ /MY_RUBY_HOME:\s?"([^"]*)"/ ? $1 : '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* CPBundle.sj | |
* AppKit | |
* | |
* Created by Nicholas Small. | |
* Copyright 2009, 280 North, Inc. | |
* | |
* This library is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU Lesser General Public | |
* License as published by the Free Software Foundation; either |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/controllers/non_namespaced_post_resources_controller.rb b/app/controllers/non_namespaced_post_resources_controller.rb | |
index 1c0d143..0dc0b74 100644 | |
--- a/app/controllers/non_namespaced_post_resources_controller.rb | |
+++ b/app/controllers/non_namespaced_post_resources_controller.rb | |
@@ -12,7 +12,7 @@ class NonNamespacedPostResourcesController < ApplicationController | |
def index | |
respond_to do |format| | |
format.html # index.html.erb (no data required) | |
- format.ext_json { render :json => find_non_namespaced_post_resources.to_ext_json(:class => NonNamespacedPostResource, :count => NonNamespacedPostResource.count(options_from_search(NonNamespacedPostResource))) } | |
+ format.ext_json { render :json => find_non_namespaced_post_resources.to_ext_json(:methods => :author_name, :class => NonNamespacedPostResource, :count => NonNamespacedPostResource.count(options_from_search(NonNamespacedPostResource))) } |
NewerOlder