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
# Note: Best Janus practice is to drop these into ~/.vimrc.before rather than ~/.vimrc itself | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
autocmd User Rails/**/* set tabstop=4 | |
autocmd User Rails/**/* set shiftwidth=4 | |
autocmd User Rails/**/* set softtabstop=4 | |
# P.S. Thanks to http://www.savagevines.com/post/2011/8/14/overriding_indentation_settings_for_vimrails for shining light on this area |
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
# Usage | |
# (Note: This command does not handle spaces in filenames!) | |
# * cd into the directory containing the files and subdirectories of files in | |
# which you wish to carry out string substitution using a regex | |
# * Run the command: | |
# rsub 'search regex' 'replacement text' | |
# * This will effect the desired substitution in files in the current directory | |
# and in any subdirectories | |
# Explaination |
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
aptitude install vim-gnome | |
The following NEW packages will be installed: | |
libruby1.8{a} vim-gnome |
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
# Usage: | |
# | |
# (Note - This command does not recursively traverse subdirectories!) | |
# | |
# * Save the script to a directory that is in your PATH variable so it can be executed | |
# * chmod u+x path/to/sort_dir # so that it can be executed | |
# * cd into the directory containing the files who's contents you wish to sort | |
# * Simpy run the command 'sort_dir' | |
# * This will product an subdirectory called 'sorted' containing all the current | |
# directory's files with their contents sorted |
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
# Drop this into your .bash_aliases or .bashrc | |
# Usage: | |
# psgrep some_substring_of_the_process_command | |
psgrep() { ps -ea -o pid,cmd|grep -v grep|grep $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
# drop this into config/initializers/enhanced_logger.rb | |
raise 'Check logger workaround if Rails version has changed' unless | |
Rails::version == "3.0.7" | |
# Overrides /path/to/gems/activesupport-3.0.7/lib/active_support/buffered_logger.rb | |
module ActiveSupport | |
class BufferedLogger | |
def add(severity, message = nil, progname = nil, &block) | |
return if @level > severity |
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
Thanks for your reply. It was a set of Sony headphones where one earphone stopped working the other day so I popped in to see ... | |
... what was required to get an exchange. I was told that a simple exchange was only possible within the first 28 days or if I had purchased a special warranty. I will try to track down the receipt and call into the store again if the purchasing of the special warranty is not crucial. | |
Thanks, | |
Declan |
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
* Declan shares a gotcha conerning Shams and Machinist 2 - Machinist 2 doesn't use it any more! http://www.theirishpenguin.com/2011/02/16/machinist-2-and-the-undefined-method-foo-for-shammodule-error/ | |
* Good news for Netbeans users, JRuby is working on a deal to keep Rails support in Netbeans via a plugin. http://markmail.org/message/r7fliknkieg7fnwq | |
* I've been a long time TextMate user, but the lack of window splits and a terminal have always grated. This week I had a little time to look at the state of the art for editors for Rails development. I looked at RubyMine (too slow), Emacs (too hard to setup and slow), Sublime (incomplete), Coda (not deep enough), and BBEdit (didn't click with me). Finally, I revisited Vim (MacVim). It seems to have a loyal following and after I spent the time going through the Vimtutor, I am now a convert. As an editor, Vim rocks. The power of the text navigation and manipulation alone were worth switching for, but add in Rails.vim (http://rails.vim.tpope.net/) and a ready |
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
# a simple/configurable rake task that generates some random fake data for the app (using faker) at various sizes | |
# NOTE: requires the faker or ffaker gem | |
# sudo gem install faker - http://faker.rubyforge.org | |
# OR | |
# sudo gem install ffaker - http://github.com/EmmanuelOga/ffaker | |
require 'faker' | |
class Fakeout |
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
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789a |