- Initialize Git repository
git init
- Create
.gitignore
file and add the following:node_modules/ *.env
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# District - Pune, Date - Today's date. You can modify it as per your requirement. | |
uri = URI.parse("https://cdn-api.co-vin.in/api/v2/appointment/sessions/public/calendarByDistrict?district_id=363&date=#{Date.today.strftime('%d-%m-%Y')}") | |
results = Net::HTTP.get(uri) | |
results = JSON.parse(results).with_indifferent_access | |
availability = {} | |
results[:centers].each do |center| | |
# 1st condition - Checking Age | |
sessions = center[:sessions].select{ |c| c[:min_age_limit] == 18 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Initiative | Benefit | Drawback | Suggestion for improvement | |
---|---|---|---|---|
Education in mother language | Very much beneficial for the students to understand in local/ mother languages, that will boost the level of understanding | English is an international language, children must know it from childhood to have better place in jobs and to reduce differences between students who know English and who doesn’t know it. | English should not be ignored completely. One subject of English language should be introduced from early childhood so that it will be easy for students to learn at early stage. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'irb/completion' | |
require 'rubygems' | |
ActiveRecord::Base.logger.level = 1 if defined?(ActiveRecord) | |
IRB.conf[:SAVE_HISTORY] = 1000 | |
# Overriding Object class | |
class Object | |
# Easily print methods local to an object's class | |
def lm |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
silence_warnings do | |
ActionDispatch::Request::LOCALHOST = (ActionDispatch::Request::LOCALHOST + ['192.168.0.1']).freeze | |
end | |
ActionController::Base.module_eval do | |
def show_detailed_exceptions? | |
request.local? | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add all gems in the global gemset to the $LOAD_PATH so they can be used in rails3 console with bundler | |
if defined?(::Bundler) | |
$LOAD_PATH.concat Dir.glob("#{ENV['rvm_path']}/gems/#{ENV['rvm_ruby_string']}@global/gems/*/lib") | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Mongoid | |
module CounterCache | |
extend ActiveSupport::Concern | |
module ClassMethods | |
# Use Case: | |
# | |
# keep a cached count of embedded collections in the parent collection(s) | |
# | |
# for example, if a Post embeds many Comments, and there have been 2 |
NewerOlder