Skip to content

Instantly share code, notes, and snippets.

View thexodus's full-sized avatar

Ashis Rai thexodus

  • Kathmandu, Nepal
View GitHub Profile
@thexodus
thexodus / gitpullerror
Created June 17, 2011 08:06
git:unable to add changes
➜ (ruby-1.9.2-p180@suga) sunago git:(three-oh) ✗ git pull --rebase
app/models/event.rb: needs update
app/views/checkin/_choose_event.html.erb: needs update
config/environment.rb: needs update
config/environments/development.rb: needs update
fatal: Unable to create '/Users/me/Dev/sunago/.git/index.lock': File exists.
@thexodus
thexodus / libxml2
Created March 7, 2011 10:00
libxml2 bug
1. libxml installed through brew
2. Error message
=================================================================================
HI. You're using libxml2 version 2.6.16 which is over 4 years old and has
plenty of bugs. We suggest that for maximum HTML/XML parsing pleasure, you
upgrade your version of libxml2 and re-install nokogiri. If you like using
libxml2 version 2.6.16, but don't like this warning, please define the constant
I_KNOW_I_AM_USING_AN_OLD_AND_BUGGY_VERSION_OF_LIBXML2 before requring nokogiri.
=================================================================================
3. Solution
@thexodus
thexodus / gist:760735
Created December 31, 2010 04:53
linecache in ruby-1.9.2-head
gem install ruby-debug19 -- --with-ruby-include=$rvm_path/src/ruby-1.9.2-head/
Regular Expression to remove all html tags except <p>
<(?!\/?p(?=>|\s.*>))\/?.*?>
# loading particular gemset
rvm ruby-1.8.7-p72@mbm
html, body{height:100%;}
.main-wrapper{min-height:100%;}
.footer-wrapper{height:120px;margin-top:-120px;}
set :default_environment, {
'PATH' => "/home/deploy/.rvm/gems/ree-1.8.7-2010.02@pa/bin:/home/deploy/.rvm/gems/ree-1.8.7-2010.02@global/bin:/home/deploy/.rvm/rubies/ree-1.8.7-2010.02/bin:$PATH",
'RUBY_VERSION' => 'ree-1.8.7-2010.02',
'GEM_HOME' => '/home/deploy/.rvm/gems/ree-1.8.7-2010.02@pa',
'GEM_PATH' => '/home/deploy/.rvm/gems/ree-1.8.7-2010.02@pa:/home/deploy/.rvm/gems/ree-1.8.7-2010.02@global',
'BUNDLE_PATH' => '/home/deploy/.rvm/gems/ree-1.8.7-2010.02@pa' # If you are using bundler.
}