Skip to content

Instantly share code, notes, and snippets.

$ rvm use 2.1.4 --debug --default
Using /usr/local/rvm/gems/ruby-2.1.4
Running /usr/local/rvm/hooks/after_use_current
Running /usr/local/rvm/hooks/after_use_rbx_opts
Running /usr/local/rvm/hooks/after_use_home_bin
Running /usr/local/rvm/hooks/after_use_maglev
Running /usr/local/rvm/hooks/after_use_jruby_opts
Running /usr/local/rvm/hooks/after_use_textmate
__rvm_rm_rf already gone: /usr/local/rvm/tmp/12114*
Regenerating ruby-2.1.4 wrappers........
$ rvm info
ruby-2.1.4:
system:
uname: "Linux uswa-tapp-smdm1.amgen.com 2.6.18-398.el5 #1 SMP Tue Aug 12 06:26:17 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux"
system: "redhat/5/x86_64"
bash: "/bin/bash => GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)"
zsh: "/bin/zsh => zsh 4.2.6 (x86_64-redhat-linux-gnu)"
$ rvm use 1.9.3-p547 --default
ruby-1.9.3-p547 - #gemset created /home/gomezn/.rvm/gems/ruby-1.9.3-p547
Creating alias current for ruby-1.9.3-p547..
Error running 'alias_create_exceute',
showing last 15 lines of /usr/local/rvm/log/1415851770_ruby-1.9.3-p547/alias_create.log
GEM_PATH=/home/gomezn/.rvm/gems/ruby-1.9.3-p547:/home/gomezn/.rvm/gems/ruby-1.9.3-p547@global
command(1): alias_create_exceute
+ for _path in '"$rvm_rubies_path"' '"$rvm_environments_path"' '"$rvm_wrappers_path"'
+ [[ -L /usr/local/rvm/rubies/current ]]
+ command rm -fv /usr/local/rvm/rubies/current
@noel
noel / 2012 Top 10 movies
Created December 28, 2012 22:53
Ebert's top 10 for 2012
1. • "Argo"
2. • "Life of Pi"
3. • "Lincoln"
4. • "End of Watch"
5. • "Arbitrage"
6 • "Flight"
7. • "The Sessions"
8. • "Beasts of the Southern Wild"
9. • "Oslo, August 31"
10. "A Simple Life"
<VirtualHost *:80>
ServerName smdm-test.mycompany.com
DocumentRoot /smdm/apps/reports_app/current/public
<Directory /smdm/apps/reports_app/current/public>
AllowOverride all
Options -MultiViews
</Directory>
# MultiViews must be turned off.
Options -MultiViews
/usr/local/rvm/gems/ruby-1.9.3-p286/gems/activesupport-3.2.7/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- ruby_debug.so (LoadError)
from /usr/local/rvm/gems/ruby-1.9.3-p286/gems/activesupport-3.2.7/lib/active_support/dependencies.rb:251:in `block in require'
from /usr/local/rvm/gems/ruby-1.9.3-p286/gems/activesupport-3.2.7/lib/active_support/dependencies.rb:236:in `load_dependency'
from /usr/local/rvm/gems/ruby-1.9.3-p286/gems/activesupport-3.2.7/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p286/gems/debugger-1.2.0/lib/ruby-debug-base.rb:1:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p286/gems/activesupport-3.2.7/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p286/gems/activesupport-3.2.7/lib/active_support/dependencies.rb:251:in `block in require'
from /usr/local/rvm/gems/ruby-1.9.3-p286/gems/activesupport-3.2.7/lib/active_su
// adds commas to large numbers
function thousandsFormatter(nStr)
{
nStr += '';
x = nStr.split('.');
x1 = x[0];
x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
ActionView::Template::Error (invalid byte sequence in UTF-8):
18: - @report.grid.details.each do |field|
19: %tr
20: %td{style: "width: 30%;"}= field
21: %td= row[field]
22:
23: .pull-right
24: = will_paginate @report.data
app/views/reports/_grid.html.haml:21:in `block (2 levels) in _app_views_reports__grid_html_haml___506165555_86852150'
app/views/reports/_grid.html.haml:18:in `each'
@noel
noel / before_ssh
Created June 27, 2012 20:56
encoding in Cygwin
$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=
@noel
noel / gist:2870859
Created June 4, 2012 21:07
mod_rewrite
ErrorDocument 503 /system/maintenance.html
RewriteEngine On
RewriteCond %{REQUEST_URI} !.(css|gif|jpg|png)$
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^/([^/]+)(/|/.*)?$ /$1/system/maintenance.html [L]