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
% rspec spec/integration/application/doc_spec.rb spec/integration/util/rdoc spec/unit/application/doc_spec.rb spec/unit/util/rdoc* | |
/Users/kavu/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead. | |
/Users/kavu/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- rdoc/tokenstream (LoadError) | |
from /Users/kavu/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' | |
from /Users/kavu/Work/GitHub/puppet/lib/puppet/util/rdoc/parser.rb:9:in `<top (required)>' | |
from /Users/kavu/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' | |
from /Users/kavu/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' | |
from /Users/kavu/Work/GitHub/puppet/spec/integration/util/rdoc/parser_spec.rb:5:in `<top (required)>' | |
from /Users/kavu/.rvm/gems |
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/bin/console.sh b/bin/console.sh | |
index 1932011..5edbeae 100644 | |
--- a/bin/console.sh | |
+++ b/bin/console.sh | |
@@ -3,24 +3,10 @@ | |
# Copyright (c) 1999-2010 Luca Garulli | |
# | |
-# resolve links - $0 may be a softlink | |
-PRG="$0" |
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
build_package_combined_patch() { | |
local package_name="$1" | |
{ | |
curl https://raw.github.com/gist/4136373/falcon.diff | patch -p1 | |
autoconf | |
./configure --prefix="$PREFIX_PATH" $CONFIGURE_OPTS | |
make -j 8 | |
make install | |
} >&4 2>&1 | |
} |
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
# I am trying out Ratchet.io and I want to add their deployment notification to my | |
# normal capistrano deployment process. Here is my first working attempt. | |
# Add this task to your deploy.rb | |
task :notify_ratchetio, :roles => :app do | |
set :revision, `git log -n 1 --pretty=format:"%H"` | |
set :local_user, `whoami` | |
set :ratchetio_token, YOUR_ACCESS_TOKEN | |
rails_env = fetch(:rails_env, "production") | |
run "curl https://submit.ratchet.io/api/1/deploy/ -F access_token=#{ratchetio_token} -F environment=#{rails_env} -F revision=#{revision} -F local_username=#{local_user} >/dev/null 2>&1" |
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 | |
# | |
# Mass assignment scanner for Ruby on Rails | |
# should be run from rails console in production | |
# environment. | |
#make sure all models are loaded | |
Dir[Rails.root + 'app/models/**/*.rb'].each { |path| require path } | |
models = ActiveRecord::Base.subclasses |
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 'minitest/autorun' | |
class MyClass | |
def initialize | |
@a = 1 | |
end | |
def a | |
"not a 1" | |
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
build_package_combined_patch() { | |
local package_name="$1" | |
{ | |
curl https://github.com/funny-falcon/ruby/compare/p385...p385_falcon.diff | patch -p1 | |
autoconf | |
./configure --prefix="$PREFIX_PATH" $CONFIGURE_OPTS | |
make -j 8 | |
make install | |
} >&4 2>&1 | |
} |
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
#... | |
gem 'backup', require: false, | |
github: 'kavu/backup', | |
branch: 'bump_fog_version', | |
ref: 'c3fd8e6eb4f464de1c8' | |
gem 'whenever', require: 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
# Let's figure out what we have in the beggning | |
git fsck --full --strict --unreachable | |
git count-objects -v | |
# Filter ALL branches deleteing `db/seeds_assets` | |
git filter-branch -f --tree-filter 'rm -rf db/seeds_assets' -- --all | |
# Remove original reflogs | |
rm -rf .git/refs/original/ |
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
file, err := os.Create("go.cprof") | |
if err != nil { | |
log.Fatal(err) | |
} | |
pprof.StartCPUProfile(file) | |
// ... | |
pprof.StopCPUProfile() |