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 Gretel | |
class << self | |
include Resettable | |
# Returns the path from with breadcrumbs are loaded. Default is +config/breadcrumbs.rb+ | |
# in the app and all loaded engines. Breadcrumbs set in the app will override | |
# breadcrumbs set in engines. | |
def breadcrumb_paths | |
@breadcrumb_paths ||= begin | |
engine_roots = Rails::Application::Railties.engines.map { |e| e.config.root } |
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
### Keybase proof | |
I hereby claim: | |
* I am mattallen on github. | |
* I am matta (https://keybase.io/matta) on keybase. | |
* I have a public key whose fingerprint is A456 F2B3 008B D3FA C4E4 F490 8AB6 0D37 C745 8134 | |
To claim this, I am signing this object: |
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
4531 packets transmitted, 3233 packets received, 28.6% packet loss | |
round-trip min/avg/max/stddev = 16.927/25396.487/162211.051/41768.166 ms |
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
3885 packets transmitted, 3787 packets received, +1 duplicates, 2.5% packet loss | |
round-trip min/avg/max/stddev = 18.762/7228.543/108513.193/17872.616 ms |
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
# Install with: | |
# bash < <(curl -L https://raw.github.com/gist/1333785) | |
# | |
# Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug | |
echo "Installing ruby-debug with ruby-1.9.3-p0 ..." | |
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem | |
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem |
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
ActiveRecord::AssociationTypeMismatch in Admin::UsersController#update | |
Channel(#2159242420) expected, got Channel(#2169779660) | |
only happens in dev, goes away if "config.cache_classes = true" |
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
ruby-1.9.2-p290 :009 > r = Record.where(:e => "x") | |
Record Load (42.8ms) SELECT "records".* FROM "records" WHERE "records"."e" = 'x' | |
=> [] | |
ruby-1.9.2-p290 :010 > r.class | |
=> ActiveRecord::Relation | |
ruby-1.9.2-p290 :011 > r.where(:c => "y") | |
Record Load (41.3ms) SELECT "records".* FROM "records" WHERE "records"."e" = 'x' AND "records"."c" = 'y' | |
=> [] | |
ruby-1.9.2-p290 :012 > |
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
.mq { | |
display:none; | |
} |
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
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. | |
Locking environment | |
/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:49:in `initialize': not in gzip format (Zlib::GzipFile::Error) | |
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:49:in `new' | |
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:49:in `initialize' | |
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:63:in `each' | |
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:54:in `loop' | |
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:54:in `each' | |
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:32:in `initialize' | |
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:17:in `new' |
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 | |
################ | |
# | |
# Put this script in your path and make it executable i.e ~/bin then chmod 755 mysqlbackup.rb | |
# | |
# 1. Create your repo (mkdir /path/to/repo && cd /path/to/repo && git init) | |
# 2. Setup the remote server (ssh user@remote "mkdir mysql_back.git" && cd mysql_back.git && git init") | |
# 3. Setup the remote (git remote add origin ssh://user@remote/home/user/mysql_back.git) | |
# 4. run mysqlbackup.rb |
NewerOlder