This file contains hidden or 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
diff --git a/Manifest.txt b/Manifest.txt | |
index 6e79ebd..6a2f480 100644 | |
--- a/Manifest.txt | |
+++ b/Manifest.txt | |
@@ -121,6 +121,7 @@ test/rubygems/rubygems_plugin.rb | |
test/rubygems/sff/discover.rb | |
test/rubygems/simple_gem.rb | |
test/rubygems/test_config.rb | |
+test/rubygems/test_deprecate.rb | |
test/rubygems/test_gem.rb |
This file contains hidden or 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
module ActiveRecord | |
class Base | |
def self.sqlserver_connection(config) #:nodoc: | |
config = config.dup.symbolize_keys! | |
config.reverse_merge! :mode => :dblib, :host => 'localhost', :username => 'sa', :password => '' | |
mode = config[:mode].to_s.downcase.underscore.to_sym | |
case mode | |
when :dblib | |
# <monkeypatch> | |
# raise ArgumentError, 'Missing :dataserver configuration.' unless config.has_key?(:dataserver) |
This file contains hidden or 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
#!/bin/sh | |
MYSQL_USER=root | |
MYSQL_PASSWORD=<PASSWORD> | |
MYSQL_OPTS= | |
RETAIN_PERIOD=5 | |
DUMP_DIRECTORY="$HOME/dumps" |
This file contains hidden or 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 Test::Unit::TestCase | |
alias_method :run_without_transaction, :run | |
def run(result) | |
exception = nil | |
Sequel::Model.db.transaction do | |
begin | |
run_without_transaction(result) | |
rescue => exception | |
# Capture exception, if raised |
This file contains hidden or 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
# This relates to the issue described at: | |
# https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4709 | |
class String | |
def %(args) | |
if args.kind_of?(Hash) | |
dup.gsub(INTERPOLATION_PATTERN_WITH_ESCAPE) do |match| | |
if match == '%%' | |
'%' | |
else |
This file contains hidden or 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
twttr.BANNED_PASSWORDS = ["111111","11111111","112233","121212","123123","123456","1234567","12345678","131313","232323","654321","666666","696969","777777","7777777","8675309","987654","aaaaaa","abc123","abc123","abcdef","abgrtyu","access","access14","action","albert","alexis","amanda","amateur","andrea","andrew","angela","angels","animal","anthony","apollo","apples","arsenal","arthur","asdfgh","asdfgh","ashley","asshole","august","austin","badboy","bailey","banana","barney","baseball","batman","beaver","beavis","bigcock","bigdaddy","bigdick","bigdog","bigtits","birdie","bitches","biteme","blazer","blonde","blondes","blowjob","blowme","bond007","bonnie","booboo","booger","boomer","boston","brandon","brandy","braves","brazil","bronco","broncos","bulldog","buster","butter","butthead","calvin","camaro","cameron","canada","captain","carlos","carter","casper","charles","charlie","cheese","chelsea","chester","chicago","chicken","cocacola","coffee","college","compaq","computer","cookie","cooper","corvette","cowbo |
This file contains hidden or 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
# Force checking of /opt path for OS X macports binaries | |
if (File.exist?('/opt/local/bin/identify')) | |
Paperclip.options[:command_path] = '/opt/local/bin' | |
end | |
# Monkeypatch to get thumbnails working by allowing proper chaining | |
class Paperclip::Attachment | |
def callback(which) |
This file contains hidden or 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
<IfModule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript | |
BrowserMatch ^Mozilla/4 gzip-only-text/html | |
BrowserMatch ^Mozilla/4\.0[678] no-gzip | |
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html | |
Header append Vary User-Agent env=!dont-vary | |
</IfModule> |
This file contains hidden or 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
module ActionView | |
module Helpers | |
def write_asset_file_contents(joined_asset_path, asset_paths) | |
FileUtils.mkdir_p(File.dirname(joined_asset_path)) | |
File.atomic_write(joined_asset_path, File.join(Rails.root, 'tmp')) { |cache| cache.write(join_asset_file_contents(asset_paths)) } | |
# Set mtime to the latest of the combined files to allow for | |
# consistent ETag without a shared filesystem. | |
mt = asset_paths.map { |p| File.mtime(asset_file_path(p)) }.max |
This file contains hidden or 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
#!/usr/bin/env ruby | |
PASSPHRASE_CHARS = [ ?0..?9, ?A..?Z, ?a..?z ].collect { |c| c.collect }.flatten.collect { |c| "%c" % c } | |
cert_name = ARGV[0] | |
unless (cert_name) | |
print "Usage: genrsa <certname>" | |
exit(-1) | |
end |