I like to install Ruby from source. I find that using RVM or rbenv adds a level of indirection I’m […]
Tag: #ruby
Programming language colors Github
<% require ‘yaml’ %> <% languages = YAML.load_file(‘config/languages.yml’) %> <% languages.each do |l| %> <% color = l[1][“color”] %> <% […]
Find similar functions between different programing languages
Great reference when moving from one programing language to another. http://hyperpolyglot.org/ Happy hacking!
irb time saver
add to ~/.irbrc: def copy(*args) IO.popen(‘pbcopy’, ‘r+’) { |clipboard| clipboard.puts args.map(&:inspect) }; end and then in irb: copy [1,2,3,4] “[1, […]
Podfile ruby syntax highlight in vim
Add this to your .vimrc configuration file: au BufRead,BufNewFile Podfile set filetype=ruby Sweet!, ;-).
Testing Rails app with drone
Short tutorial about setting up drone to test rails 4 app running on ruby 2.1. For us who working in […]
rbserv—a simple Ruby HTTP server
I use this one all the time to get a simple HTTP server up-and-running very quickly for any “static” website […]
Speedup rvm ruby on mac
If you are using rvm you may have encountered some performance issue with ruby. For some detailed information of the […]
Speed up Vim + Ruby when using rbenv
If you noticed sluggishness of Vim while using rbenv, try adding the following line to your .vimrc file: let g:ruby_path […]
Vim+Ruby: highlight debugger statements
Highlight those debugger and binding.pry statements in vim: ” Make those debugger statements painfully obvious au BufEnter *.rb syn match […]
Ctags + Bundler + Vim = Exuberance
I have meant to do this for a while after reading this article but today I took the plunge and […]
Parse times, sub-totals, and totals out of Rails log statements
I often times want to know what the specific breakdowns are of an action in my Rails apps. So, I […]
Renewing SSL Certificates in RVM
Ever bumped into this error message? Bundler::Fetcher::CertificateFailureError: Could not verify the SSL certificate for https://rubygems.org/. In RVM you can update […]
Brevidy, the open source video social network
To any and all who might be interested, I just open sourced Brevidy, a video social network that I created. […]
Use Rubocop in any Ruby project without installing it
One of the applications we are developing at KNEIP is not yet migrated to Ruby 1.9 but we would like […]
Cost effective way of Exception tracking
I am a firm believer of Release early, release often enabling the user to help define what the software will […]
Configure the Vagrant login user during provisioning using the Shell provider.
Vagrant allows for provisioning of new guest instances using Shell but the script is always run in the root context. […]
Command to create ctags for a project in vim
This defines a :Createtags command in vim: function! Ccreatetags() call system(“ctags –recurse=yes –languages=Ruby,C . `bundle list –paths`”) endfunction command Createtags […]
Why use CoffeeScript?
I can’t speak for you, but where I can, I like to use CoffeeScript because: it makes my life easier […]
redirect_to, array and the splat operator
I was wondering if there were a way to make this controller code more readable: events_controller.rb format.zip do if @event.zip_cache_up_to_date? […]