This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Multiple integer overflows in the rb_str_buf_append function in | |
Ruby 1.8.4 and earlier, 1.8.5 before 1.8.5-p231, 1.8.6 before | |
1.8.6-p230, 1.8.7 before 1.8.7-p22, and 1.9.0 before 1.9.0-2 | |
allow context-dependent attackers to execute arbitrary code or | |
cause a denial of service via unknown vectors that trigger memory | |
corruption. (CVE-2008-2662) | |
Multiple integer overflows in the rb_ary_store function in Ruby | |
1.8.4 and earlier, 1.8.5 before 1.8.5-p231, 1.8.6 before 1.8.6-p230, | |
and 1.8.7 before 1.8.7-p22 allow context-dependent attackers to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 95101dc9d5a1cd201db25cca25b3847710759930 | |
Author: Jesse Newland <[email protected]> | |
Date: Thu Oct 23 19:23:28 2008 -0400 | |
don't negate dash-preceded parts of words | |
diff --git a/lib/scoped_search/query_language_parser.rb b/lib/scoped_search/query_language_parser.rb | |
index d68e22b..2eb3973 100644 | |
--- a/lib/scoped_search/query_language_parser.rb | |
+++ b/lib/scoped_search/query_language_parser.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
# maximum number of simultaneous active connections from an upstream web server | |
maxconn 500 | |
# Logging to syslog facility local0 | |
# log 127.0.0.1 local0 | |
# Distribute the health checks with a bit of randomness | |
spread-checks 5 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A Sinatra App as a Rails Plugin | |
# | |
# In your Edge Rails app: | |
# | |
# ruby script/plugin install git://gist.github.com/50625.git | |
require 'sinatra/base' | |
class SinatraRailsPlugin < Sinatra::Base | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple example of using ShadowFacter with RSpec to verify system configuration | |
# bradley @ http://railsmachine.com | |
# | |
# run with 'spec -c installed_test.rb' | |
require 'shadow_facter' | |
def installed_fact(n) | |
name = n | |
fact(name) { exec("#{name.to_s} --version") ? true : false } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# deploy to staging from your current topic branch, with ease | |
set :branch, "origin/#{`git branch`.scan(/^\* (\S+)/)}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Date | |
def self.next_weekday(original_date=Date.today) | |
weekdays_from(original_date, 1) | |
end | |
def self.weekdays_since(original_date, now=Date.today) | |
weekdays = 1..5 | |
cursor = original_date | |
weekdays_skipped = 0 | |
until cursor == now do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NAME: recaptcha | |
# VERSION: 1.0 | |
# AUTHOR: Peter Cooper [ http://www.rubyinside.com/ github:peterc twitter:peterc ] | |
# DESCRIPTION: Sinatra plugin to provide CAPTCHA support through recaptcha.net | |
# COMPATIBILITY: 0.3.2 /and/ latest rtomayko Hoboken builds! | |
# LICENSE: Use for what you want, just don't claim full credit unless you make significant changes | |
# | |
# INSTRUCTIONS: | |
# 0. Check out an extended client code example at the footer of this file | |
# 1. Ensure _this_ file is lib/recaptcha.rb within your app's directory structure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rack/hoptoad_notifier' | |
use Rack::HoptoadNotifier do |config| | |
config[:api_key] = 'XXXXXXXX' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# urlmonitor - print out the URLs requested system wide on the main network interface | |
# Accept a network interface name as an optional argument | |
iface = ARGV.first | |
# No interface specified? Try to guess which one is king.. | |
unless iface | |
`ifconfig -l`.split.each do |iface| | |
next if iface =~ /^lo/ | |
break if `ifconfig #{iface}` =~ /inet (0|1|2)/ |
OlderNewer