Skip to content

Instantly share code, notes, and snippets.

View prathamesh-sonpatki's full-sized avatar
🏠
Working from home

प्रथमेश Sonpatki prathamesh-sonpatki

🏠
Working from home
View GitHub Profile
prathamesh ~/Projects/sources/reactjs-by-example/chapter11 2.3.0 (bigbinary/reactjs-by-example) -> master
$ npm start
> react-router-flux@0.0.1 start /Users/prathamesh/Projects/sources/reactjs-by-example/chapter11
> node server.js
events.js:141
throw er; // Unhandled 'error' event
^
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
@prathamesh-sonpatki
prathamesh-sonpatki / gist:055afb74b66108e71ded
Created December 6, 2015 16:15
example_of_error_shown_by_using_assert_predicate
prathamesh ~/Projects/fun/rails-5-test-runner-app 2.2.2 -> master
$ be rails t
DEPRECATION WARNING: ActiveRecord::Base.raise_in_transactional_callbacks= is deprecated, has no effect and will be removed without replacement. (called from <top (required)> at /Users/prathamesh/Projects/fun/rails-5-test-runner-app/test/test_helper.rb:3)
Run options: --seed 43915
# Running:
F
"Post.count" didn't change by 1.
require 'minitest/autorun'
class LolTest < MiniTest::Test
def test_assert_predicate
assert_predicate 1, :even?, "Black friday"
end
end
# $ ruby lol_test.rb
# Run options: --seed 48082
@prathamesh-sonpatki
prathamesh-sonpatki / gist:5de566103cdf9ef8e4e7
Last active November 28, 2015 11:43
Installing eventmachine on El Capitan
prathamesh ~/Projects/sources/ruby-conferences-site 2.2.0 (prathamesh-sonpatki/ruby-conferences-site) -> master
$ gem install eventmachine -v '1.0.7'
Building native extensions. This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
/Users/prathamesh/.rbenv/versions/2.2.0/bin/ruby -r ./siteconf20151128-51167-z96xnx.rb extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... no
checking for ruby/thread.h... yes
@prathamesh-sonpatki
prathamesh-sonpatki / index-dead-code-elimintation.js
Last active August 29, 2015 14:27
Code optimisation using babel
"use strict";
var fn = function fn(a, b) {
return a + b;
};
var a = 10;
var b = 20;
// Conditional statements

Subject - Proposal for hosting RubyConfIndia 2016

Hi all,

We need to decide venue for hosting RubyConfIndia 2016. Earlier editions of RubyConfIndia have been hosted in Banglore, Pune and Goa for two years respectively and 2016 needs a new venue.

Please send a proposal to team@emergingtechs.in as to why we should hold RubyConfIndia in your city. The tentative dates are 18-19 March 2016.

>> pp Rails.application.config.assets.paths
["/Users/prathamesh/Projects/sources/codetriage/app/assets/images",
"/Users/prathamesh/Projects/sources/codetriage/app/assets/javascripts",
"/Users/prathamesh/Projects/sources/codetriage/app/assets/stylesheets",
"/Users/prathamesh/Projects/sources/codetriage/app/assets",
"/Users/prathamesh/Projects/sources/codetriage/vendor/assets/javascripts",
"/Users/prathamesh/Projects/sources/codetriage/vendor/assets/stylesheets",
"/Users/prathamesh/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/teaspoon-0.7.4/app/assets/javascripts",
"/Users/prathamesh/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/teaspoon-0.7.4/app/assets/stylesheets",
"/Users/prathamesh/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/teaspoon-0.7.4/app/assets",
>> pp Rails.application.config.assets.paths
["/Users/prathamesh/Projects/sources/codetriage/app/assets/images",
"/Users/prathamesh/Projects/sources/codetriage/app/assets/javascripts",
"/Users/prathamesh/Projects/sources/codetriage/app/assets/stylesheets",
"/Users/prathamesh/Projects/sources/codetriage/vendor/assets/javascripts",
"/Users/prathamesh/Projects/sources/codetriage/vendor/assets/stylesheets",
"/Users/prathamesh/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/teaspoon-0.7.4/app/assets/javascripts",
"/Users/prathamesh/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/teaspoon-0.7.4/app/assets/stylesheets",
"/Users/prathamesh/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/teaspoon-0.7.4/vendor/assets/javascripts",
"/Users/prathamesh/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/coffee-rails-4.0.1/lib/assets/javascripts",