2 problems
- It is looking for ./partial.html and not partial.mustache
- Using the method chain in config.ru you should see "klass is Partial". It seems like it should be PartialDemo::Views::Partial
module Rip | |
module Commands | |
# Runs ~/.rip/active/hooks/used after `rip use` | |
# and ~/.rip/active/hooks/will-leave when moving to another env | |
alias_method :rip_use, :use | |
def use(*args) | |
run_hook_if_exists('before-leave', Rip::Env.active) | |
rip_use(*args) | |
run_hook_if_exists('after-use', Rip::Env.active) | |
end |
RAILS_ROOT ||= ENV["RAILS_ROOT"] | |
namespace :bundle do | |
js_bundle = Rails.root + "/public/javascripts/bundle.js" | |
js_files = Dir[Rails.root + "/public/javascripts/{github,jquery}.*.js"].sort | |
task :all => [ js_bundle, :gist_js, :css ] | |
file js_bundle => js_files do |task| | |
require 'lib/js_minimizer' |
class SomeFastJob | |
@queue = :high | |
def self.perform | |
fast_stuff | |
end | |
end | |
class SomeSlowJob | |
@queue = :low |
diff --git a/haystack/models.py b/haystack/models.py | |
index ab5f401..7777bf8 100644 | |
--- a/haystack/models.py | |
+++ b/haystack/models.py | |
@@ -3,6 +3,7 @@ from django.core.exceptions import ObjectDoesNotExist | |
from django.db import models | |
from django.utils.encoding import force_unicode | |
from django.utils.text import capfirst | |
+from django.utils.translation import ugettext_lazy as _ | |
setup_socket | |
fork { | |
accept_connection | |
handle_connection (with select()) | |
} | |
waitall |
# Used to graph results from autobench | |
# | |
# Usage: ruby autobench_grapher.rb result_from_autobench.tsv | |
# | |
# This will generate three svg & png graphs | |
require "rubygems" | |
require "scruffy" | |
require 'csv' | |
require 'yaml' |
public static V GetValueOrDefault<K, V>(this Dictionary<K, V> dic, K key, V defaultVal) | |
{ | |
V ret; | |
return dic.TryGetValue (key, out ret) ? ret : defaultVal; | |
} |
require 'rubygems' | |
require 'typhoeus' | |
require 'yajl/json_gem' | |
hydra = Typhoeus::Hydra.new | |
request = Typhoeus::Request.new('http://localhost:8089/?id=timeline', :method => :post, :body => stuff.to_json) | |
request.on_complete do |response| | |
response.code # http status | |
response.body | |
response.time # time taken in seconds |
require 'rubygems' | |
require 'bert' | |
require 'json' | |
require 'yajl' | |
require 'benchmark' | |
ITER = 1_000 | |
tiny = t[:ok, :awesome] | |
small = t[:ok, :answers, [42] * 42] |