i18n_backend_database
Database Backend for Rails I18n
i18n_db_admin
Demo application including admin interface for Rails translations using i18n_db
<?php | |
/** | |
* SchemateBehavior - Somewhat ActivRecord'ish for CakePHP.. | |
* | |
* @author Kjell Bublitz | |
* @link http://cakealot.com | |
* @license MIT | |
*/ | |
class SchemataBehavior extends ModelBehavior { | |
# Lighter -- Campfire from the command line | |
# usage: ruby lighter.rb subdomain "Main Room" macournoyer@gmail | |
require "rubygems" | |
require "tinder" | |
require "readline" | |
require "highline/import" | |
class Lighter | |
def initialize(room) | |
@room = room |
attwenger = [ | |
{ :year => 1991, :tracks => 18, :title => "Most" }, | |
{ :year => 1992, :tracks => 10, :title => "Pflug" }, | |
{ :year => 1993, :tracks => 17, :title => "Luft" }, | |
{ :year => 1997, :tracks => 5, :title => "Song" }, | |
{ :year => 2002, :tracks => 15, :title => "Sun" }, | |
{ :year => 2005, :tracks => 14, :title => "dog" }, | |
{ :year => 2006, :tracks => 17, :title => "dog2 remixes" }, | |
{ :year => 2007, :tracks => 8, :title => "die Kia" } | |
] |
#!/usr/bin/env ruby | |
# | |
# A hook script to verify that only syntactically valid ruby code is commited. | |
# Called by git-commit with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# Put this code into a file called "pre-commit" inside your .git/hooks | |
# directory, and make sure it is executable ("chmod +x .git/hooks/pre-commit") | |
# |
i18n_backend_database
Database Backend for Rails I18n
i18n_db_admin
Demo application including admin interface for Rails translations using i18n_db
/* | |
As of version 1.1.2, Propane will load and execute the contents of | |
~Library/Application Support/Propane/unsupported/caveatPatchor.js | |
immediately following the execution of its own enhancer.js file. | |
You can use this mechanism to add your own customizations to Campfire | |
in Propane. | |
Below you'll find two customization examples. |
This allows you to use the following video streaming services outside of the US from your Mac without having to use a proxy or VPN, so no big bandwidth issues:
#!/usr/bin/env ruby | |
require 'net/telnet' | |
cache_dump_limit = 100 | |
localhost = Net::Telnet::new("Host" => "localhost", "Port" => 11211, "Timeout" => 3) | |
slab_ids = [] | |
localhost.cmd("String" => "stats items", "Match" => /^END/) do |c| | |
matches = c.scan(/STAT items:(\d+):/) | |
slab_ids = matches.flatten.uniq | |
end |
module Abyss | |
ROUNDTRIP = {}.tap { |abyss| abyss.default = abyss }.freeze | |
def to_abyss(obj = self) | |
case obj | |
when Hash | |
obj.inject({}) { |h,(k, v)| h.update k => to_abyss(v) }.tap { |h| h.default = ROUNDTRIP } | |
when Array | |
obj.map { |e| to_abyss(e) } | |
else | |
obj |