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
setup_socket | |
fork { | |
accept_connection | |
handle_connection (with select()) | |
} | |
waitall |
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 |
# 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 '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 '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 |
Namespace = ( -> | |
merge = (target, source) -> | |
for key, val of source | |
target[key] = val | |
target | |
_assertValidFQN = (fqn) -> | |
unless ///^[a-z0-9_.]+///.test fqn then throw 'invalid namespace' | |
class Procedure |