Skip to content

Instantly share code, notes, and snippets.

{:default => <<-DEFAULT_SQL.strip, :mysql => <<-MYSQL.strip}
UPDATE users SET item_count = item_count + 1
WHERE id IN (SELECT user_id FROM buckets WHERE id = NEW.bucket_id)
DEFAULT_SQL
UPDATE users, buckets SET item_count = item_count + 1
WHERE users.id = user_id AND buckets.id = NEW.bucket_id
MYSQL
before do
content_type :jsonp
@backend = Visage::Config.backend
end
# /data/:host/:plugin/:optional_plugin_instance
get %r{/data/([^/]+)/([^/]+)((/[^/]+)*)} do
# parameter unpacking
options = {
@auxesis
auxesis / gist:3174963
Created July 25, 2012 07:44
no exported resources - how do it then?
node /^mostage-dvmh-sphinx-\d+.cust.bulletproof.net$/ {
movember_sphinx_server { $::fqdn:
collectd_client_report_to => 'mostage-dvmh-mgmt-01.cust.bulletproof.net',
syslog_client_report_to => 'mostage-dvmh-mgmt-01.cust.bulletproof.net',
}
}
node /^mostage-dvmh-slave-\d+.cust.bulletproof.net$/ {
if $::fqdn =~ /slave-02/ {
movember_sphinx_server { $::fqdn:
#!/usr/bin/env ruby
require 'rubygems'
require 'fastercsv'
unix@glenmorangie] -> cucumber request.feature
no such file to load -- spec/expectations (LoadError)
/home/lunix/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
/home/lunix/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
/home/lunix/work/bulletproof/projects/cauldron/features/support/env.rb:9
/home/lunix/.rvm/gems/ruby-1.8.7-p330/gems/cucumber-0.10.0/bin/../lib/cucumber/rb_support/rb_language.rb:143:in `load'
/home/lunix/.rvm/gems/ruby-1.8.7-p330/gems/cucumber-0.10.0/bin/../lib/cucumber/rb_support/rb_language.rb:143:in `load_code_file'
/home/lunix/.rvm/gems/ruby-1.8.7-p330/gems/cucumber-0.10.0/bin/../lib/cucumber/runtime/support_code.rb:176:in `load_file'
/home/lunix/.rvm/gems/ruby-1.8.7-p330/gems/cucumber-0.10.0/bin/../lib/cucumber/runtime/support_code.rb:78:in `load_files!'
/home/lunix/.rvm/gems/ruby-1.8.7-p330/gems/cucumber-0.10.0/bin/../lib/cucumber/runtime/support_code.rb:77:in `each'
%p
Blah blah blah blah
%a(href='#foo') foo
and
%a(href='#bar')> bar
\.
-# The problem with the above Haml fragment is that I am left with a space after <a href='#bar'>bar</a> and before the period.
-# Haml's whitespace removal does not resolve the issue, because it can either remove ALL whitespace
-# around an element or ALL whitespace within an element. Neither option seems to fit the bill.