First, add gem 'web-console', '~> 2.0'
to the :development
group in
your Gemfile and run bundle install
(it won’t have been included when
you upgraded Rails). Once it’s been installed, you can simply drop a
reference to the console helper (i.e., <%
console %>=) into any view
you want to enable it for. A console will also be provided on any error
Here's a list of the interactive Emacs Lisp functions, provided by projectile:
Keybinding | Description |
---|---|
C-c p f | Display a list of all files in the project. With a prefix argument it will clear the cache first. |
C-c p F | Display a list of all files in all known projects. |
C-c p 4 f | Jump to a project's file using completion and show it in another window. |
C-c p d | Display a list of all directories in the project. With a prefix argument it will clear the cache first. |
This file contains 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/local/bin/python | |
""" | |
To use this script, you must be in the root directory of a Rails project that | |
is using git. You should also make sure that your directory does not contain any | |
uncommitted changes. Then run: | |
$ python rails_switch_branch.py name_of_another_branch | |
Running the above will do the following: |
This file contains 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
language: ar | |
days: | |
sunday: "الأحد" | |
monday: "الاثنين" | |
tuesday: "الثلاثاء" | |
wednesday: "الأربعاء" | |
thursday: "الخميس" | |
friday: "الجمعة" | |
saturday: "السبت" |
This file contains 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
Credit card: 5105105105105100 | |
CVV: 555 |
This file contains 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 just updated to #mavericks, and here are notes (in case someone else is doing the update): | |
#mavericks | |
1. Terminal stopped working, might be because of ZSH. I had to go to Terminal -> Preferences -> Startup -> Shells open with: Command: /bin/zsh | |
2. Xcode needs to be updated to get RVM working. Update Xcode and run it once to finalize the update. | |
3. Remove all rubies `rvm list ; rvm remove ... ;` | |
4. Remove RVM `rvm implode` | |
5. Update brew `brew update` | |
6. Run `brew doctor` and resolve all issues |
This file contains 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
[alias] | |
clean-branches = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" |
This file contains 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
Dir.glob("app/**/*").select { |filename| ["rb", "js", "css", "scss", "erb", "haml", "yml"].include? filename.split(".").last }.each { |filename| | |
stripped = `git stripspace < #{filename}` | |
File.open(filename, 'w') { |file| file.write(stripped) } | |
} |
This file contains 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
## Yield | |
def try | |
yield if block_given? | |
end | |
## Call | |
def try(&block) | |
block.call if block |
NewerOlder