Skip to content

Instantly share code, notes, and snippets.

@arvindravi
arvindravi / multibit.log
Created December 20, 2013 11:25
Multibit Log as on 20-Dec-13
This file has been truncated, but you can view the full file.
17:31:33.173 [main] INFO org.multibit.MultiBit - Starting MultiBit at 9 Oct 2013 12:01:33 GMT
17:31:33.190 [main] DEBUG org.multibit.MultiBit - java.runtime.name = Java(TM) SE Runtime Environment
17:31:33.190 [main] DEBUG org.multibit.MultiBit - sun.boot.library.path = /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries
17:31:33.190 [main] DEBUG org.multibit.MultiBit - java.vm.version = 20.45-b01-451
17:31:33.190 [main] DEBUG org.multibit.MultiBit - awt.nativeDoubleBuffering = true
17:31:33.190 [main] DEBUG org.multibit.MultiBit - gopherProxySet = false
17:31:33.191 [main] DEBUG org.multibit.MultiBit - mrj.build = 11M4406
17:31:33.191 [main] DEBUG org.multibit.MultiBit - java.vm.vendor = Apple Inc.
17:31:33.191 [main] DEBUG org.multibit.MultiBit - java.vendor.url = http://www.apple.com/
17:31:33.191 [main] DEBUG org.multibit.MultiBit - path.separator = :
@arvindravi
arvindravi / gist:5541123
Created May 8, 2013 15:11
mechanize - gem install error
RROR: Error installing mechanize:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for main() in -lstdc++... yes
checking for ruby/encoding.h... yes
creating Makefile
make
compiling unf.cc
@arvindravi
arvindravi / calc.rb
Last active December 16, 2015 20:39
total_hours = params[:totalhours].to_i
max_hours = params[:maxhours].to_i
att_hours = params[:atthours].to_i
minimum_classes = 0.75 * total_hours
@classes_left = total_hours - max_hours
if att_hours > minimum_classes
@s = "You can safely bunk " + (att_hours - minimum_classes).round.to_s + " hours more."
else
@s = "You need to attend " + (minimum_classes - att_hours).round.to_s + " hours more to a safe 75%."
@arvindravi
arvindravi / gist:4184691
Created December 1, 2012 20:16
Meteorite Error
~ Meteor $ mrt create foo
Installing Meteor
branch: https://github.com/meteor/meteor.git#master
Installing smart packages
/usr/lib/nodejs/meteorite/node_modules/wrench/lib/wrench.js:371
@arvindravi
arvindravi / blog.html
Created December 1, 2012 13:02
Blog - Meteor JS
<body>
<div class="container">
<div class="row">
<br />
<div>
{{> posts}}
</div>
</div>
</div>
</body>
@arvindravi
arvindravi / client.js
Created December 1, 2012 13:01
Client
Template.posts.posts = function(){
return Posts.find({});
};
Template.posts.events({
'click input#delete_post':function(){
console.log(this);
// Posts.remove(Posts.findOne({id: this._id}));
}
});
@arvindravi
arvindravi / photo.rb
Created November 2, 2012 10:27
Model - Photo | Phi
class Photo
include Mongoid::Document
include Mongoid::Paperclip
require 'digest/sha1'
attr_accessor :password
has_mongoid_attached_file :picture, :styles => { :small => "150x150>" },
:url => "/photos/:basename.:extension",
:path => ":rails_root/photos/:basename.:extension"
field :caption, :type => String

Gist.io Sample Text File

One Two Three

This is a test sentence. Check. Check. Check.

mongo_mapper (0.11.1) lib/mongo_mapper/extensions/object.rb:17:in `to_mongo'
mongo_mapper (0.11.1) lib/mongo_mapper/plugins/keys/key.rb:47:in `set'
mongo_mapper (0.11.1) lib/mongo_mapper/plugins/keys.rb:304:in `write_key'
mongo_mapper (0.11.1) lib/mongo_mapper/plugins/dirty.rb:50:in `write_key'
(eval):10:in `password='
mongo_mapper (0.11.1) lib/mongo_mapper/plugins/keys.rb:182:in `block in attributes='
mongo_mapper (0.11.1) lib/mongo_mapper/plugins/keys.rb:180:in `each_pair'
mongo_mapper (0.11.1) lib/mongo_mapper/plugins/keys.rb:180:in `attributes='
mongo_mapper (0.11.1) lib/mongo_mapper/plugins/accessible.rb:18:in `attributes='
mongo_mapper (0.11.1) lib/mongo_mapper/plugins/protected.rb:27:in `attributes='
ArgumentError in UsersController#create
wrong number of arguments (1 for 0)
Rails.root: /home/arvind/Projects/Rails/twit
Application Trace | Framework Trace | Full Trace
app/controllers/users_controller.rb:6:in `create'
Request
Parameters: