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
find . -type f -atime +60 -print0 | xargs -0 rm |
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
:g/^M/s///g | |
BUT, you can't just write <Shift>+6 for the ^ character, you need to hold down <Ctrl>+VM (or <Ctrl>V <Ctrl>M). |
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
http://strugglingwithruby.blogspot.com/2009/05/regular-expressions-in-ruby.html |
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 -rq dirA dirB |
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
sudo ifconfig en1 ether 00:e2:e3:e4:e5:e6 |
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
http://www.ruby-doc.org/core/classes/Time.html#M000392 |
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
If you're using rvm and multiple rubies and rails etc and rake borks on you. | |
Execute it with "bundle" | |
ie. bundle exec rake -T | |
or | |
bundle exec rake db:create | |
from: http://house9.blogspot.com/2011/06/rails-31-and-ruby-192-p180-rake-aborted.html |
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
by putting ;nil on the 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
http://www.leonardoborges.com/writings/2008/08/07/why-i-like-ruby-1-alias_method/ | |
module ActiveRecord | |
class Base | |
alias_method :find_with_ferret_original, :find_with_ferret | |
def find_with_ferret(q, options = {}, find_options = {}) | |
remove_diatrictics!(q) | |
find_with_ferret_original(q, options, find_options) | |
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
http://pauldotcom.com/2011/11/metasploit-changes-to-git.html |
OlderNewer