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
local:1.9.2% git clone mojombo/grit | |
Initialized empty Git repository in /home/jbbarth/dev/grit/.git/ | |
remote: fatal: Could not switch to '/data/repositories/a/a8/e2/95/mojombo': No such file or directory | |
remote: aborting due to possible repository corruption on the remote side. | |
fatal: early EOF | |
fatal: index-pack failed | |
#same with proxymachine... | |
local:1.9.2% git clone mojombo/proxymachine | |
Initialized empty Git repository in /home/jbbarth/dev/proxymachine/.git/ |
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
% git clone https://git.fachschaften.org/redmine-events | |
Initialized empty Git repository in /home/jbbarth/dev/redmine/redmine-events/.git/ | |
got 2048f30a53ed5d52a31fc2d664344d70f331f411 | |
walk 2048f30a53ed5d52a31fc2d664344d70f331f411 | |
got 447f6d2fec34a77c910a929f3def8c7e55f1d2d2 | |
got 89b477fbb6c99668ad0336d6f897137488078eeb | |
got 9995164130e63a57314176a69e8f5edd5dc8de18 | |
walk 89b477fbb6c99668ad0336d6f897137488078eeb | |
got e4860cadba851070e42d7de72f3eddb65f5ced37 | |
got ae030a6c6087b85a1352275df82906df9dc8a298 |
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
% export RAILS_ENV=test | |
% rake db:reset db:create db:migrate redmine:plugins >/dev/null | |
% rails runner '$stderr.puts User.column_names.include?("sudoer")' >/dev/null | |
true | |
% rake test | |
[...fail fail fail...] | |
% rails runner '$stderr.puts User.column_names.include?("sudoer")' >/dev/null |
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
# See: https://github.com/railsdog/deface/issues/59 | |
ActionView::Template.class_eval do | |
def initialize_with_deface_patch(source, identifier, handler, details) | |
if handler.class.to_s.demodulize == "ERB" | |
initialize_without_deface_patch(source, identifier, handler, details) | |
else | |
initialize_without_deface(source, identifier, handler, details) | |
end | |
end |
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
>> Date.current | |
=> Wed, 29 Aug 2012 | |
>> Date.today | |
=> Thu, 30 Aug 2012 | |
>> Date.tomorrow | |
=> Thu, 30 Aug 2012 |
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 User < ActiveRecord::Base | |
has_many :memberships, :include => :roles | |
has_many :projects, :through => :memberships | |
end | |
User.first.memberships | |
#=> eager loads "roles" | |
User.first.projects | |
#=> does NOT eager loads "roles" |
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
require 'rack/utils' | |
class FixScnHeadersMiddleware | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
if env["HTTP_X_FORWARDED_HOST"] | |
env["HTTP_X_FORWARDED_HOST"].gsub!(/,\s?[^,]+.ac.cs$/,"") |
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
Deface::Override.new :virtual_path => 'account/login', | |
:name => 'fix-back-url-escape', | |
:insert_before => '#login-form', | |
:text => '<% params[:back_url] = CGI.unescape(params[:back_url]) if params[:back_url].match(/^https?%/) %>' |
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
% s3cmd --debug mb s3://zbucket | |
DEBUG: ConfigParser: Reading file '/Users/jbbarth/.s3cfg' | |
DEBUG: ConfigParser: access_key->X2...17_chars...C | |
DEBUG: ConfigParser: bucket_location->US | |
DEBUG: ConfigParser: default_mime_type->binary/octet-stream | |
DEBUG: ConfigParser: delete_removed->False | |
DEBUG: ConfigParser: dry_run->False | |
DEBUG: ConfigParser: encoding->UTF-8 | |
DEBUG: ConfigParser: encrypt->False | |
DEBUG: ConfigParser: follow_symlinks->False |
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
[ | |
{lager, [ | |
{crash_log, "/var/log/riak-cs/crash.log"}, | |
{crash_log_count, 5}, | |
{crash_log_date, "$D0"}, | |
{crash_log_msg_size, 65536}, | |
{crash_log_size, 10485760}, | |
{error_logger_redirect, true}, | |
{handlers, [ | |
{lager_file_backend, [ |
OlderNewer