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
require 'rubygems' | |
require 'mustache' | |
class HandleBar < Mustache | |
def respond_to?(methodname) | |
methodname = methodname.to_s.split(/\s+/).first | |
super methodname | |
end | |
def method_missing(methodname, *args) |
require 'rubygems' | |
require 'mustache' | |
class HandleBar < Mustache | |
def respond_to?(methodname) | |
methodname = methodname.to_s.split(':').first | |
super methodname | |
end | |
def method_missing(methodname, *args) |
#!/bin/bash | |
if [ $# -ne 1 ]; then | |
echo "Usage: vipy <python module>" | |
exit 1 | |
fi | |
MODULE_LOCATION=`python -c "import $1; print $1.__file__.rstrip('c')"` | |
if [ -z $MODULE_LOCATION ]; then |
require 'benchmark' | |
require 'yaml' | |
require 'set' | |
# This overrides 'require' to records the time it takes to require a file, and | |
# then generate a report. It's intelligent enough to figure out where files were | |
# required from and construct a hierarchy of the required files. | |
# | |
# To use, copy this file to lib/require_benchmarking.rb, then add this to the | |
# top of the Rails::Initializer block in environment.rb: |
#!/bin/bash | |
# | |
# Save in your .bash_profile then: isreg domain.com | |
function isreg { | |
dig soa $1 | grep -q ^$1 && echo "Yes" || echo "No" | |
} |
require 'rubygems' | |
require 'bert' | |
require 'json' | |
require 'yajl' | |
require 'benchmark' | |
ITER = 1_000 | |
tiny = t[:ok, :awesome] | |
small = t[:ok, :answers, [42] * 42] |
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 |
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; | |
} |
# 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' |