Skip to content

Instantly share code, notes, and snippets.

Rajeev Sharma rajeevkannav

Block or report user

Report or block rajeevkannav

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rajeevkannav
rajeevkannav / InstallPopcornTime.md
Created Dec 8, 2018 — forked from flyingluscas/InstallPopcornTime.md
Installing Popcorn Time on Ubuntu 16.x
View InstallPopcornTime.md

1. Downloading

32 bits version

$ wget https://get.popcorntime.sh/build/Popcorn-Time-0.3.10-Linux-32.tar.xz -O popcorntime.tar.xz

64 bits version

@rajeevkannav
rajeevkannav / System Design.md
Last active Oct 23, 2018 — forked from vasanthk/System Design.md
System Design Cheatsheet
View System Design.md

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@rajeevkannav
rajeevkannav / The Technical Interview Cheat Sheet.md
Created Sep 20, 2018 — forked from TSiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.
View The Technical Interview Cheat Sheet.md

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@rajeevkannav
rajeevkannav / kaminari.rb
Created Sep 5, 2018
Skip Total Count view information if there is no filter
View kaminari.rb
module ActiveAdmin
module Views
class PaginatedCollection < ActiveAdmin::Component
protected
# modified from will_paginate
def page_entries_info(options = {})
if options[:entry_name]
entry_name = options[:entry_name]
@rajeevkannav
rajeevkannav / collactions.md
Last active Jul 18, 2018
HelpFull Links Actually Great Ones
View collactions.md
@rajeevkannav
rajeevkannav / PostgreSQL-Ubuntu.md
Last active Jul 20, 2018
PostgreSQL (10.4 (Ubuntu 10.4-2.pgdg16.04+1)) Ubuntu 16.04.4 LTS
View PostgreSQL-Ubuntu.md

PostgreSQL (10.4 (Ubuntu 10.4-2.pgdg16.04+1)) Ubuntu 16.04.4 LTS

Installation

https://www.postgresql.org/download/linux/ubuntu/

Create the file /etc/apt/sources.list.d/pgdg.list and add a line for the repository

deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main

View manjula.rb
require 'json'
x = JSON.parse('{
"@context": [
"https://opencontext.org/contexts/search.json",
"http://geojson.org/geojson-ld/geojson-context.jsonld"
],
"id": "http://opencontext.org/subjects-search/Turkey/Kenan+Tepe.json",
"label": "Open Context API",
"dcmi:modified": "2018-01-31T03:20:58Z",
"dcmi:created": "2012-06-30T00:00:00Z",
View gist:6a479736552df68d4a431e334ad1951b
#first generate a key for your domain
openssl genrsa -out yourdomain.com.key 2048
#then generate the request
openssl req -new -key yourdomain.com.key -out yourdomain.com.csr
@rajeevkannav
rajeevkannav / deploy.rb
Created Dec 1, 2017
Mina Deploy Ubuntu 17.10-From Scratch-Rails-Ruby-Mysql-Nginx-Puma and all possible option
View deploy.rb
require 'mina/rails'
require 'mina/git'
require 'mina/puma'
require 'mina/rvm'
require 'yaml'
set :user, 'deploy'
set :port, '22'
set :forward_agent, true
set :term, :system
@rajeevkannav
rajeevkannav / bullsandcows.rb
Last active Nov 30, 2017
Write a command line program in ruby that accurately and efficiently guesses the word in 4 letter word Cows and Bulls game.
View bullsandcows.rb
class RepeatedCharactorFound < StandardError
def message
"Repeated charactors are not allowed. Please Try again."
end
end
class MinimumLengthRequired < StandardError
def message
"Charactor length must be equal to four. Please Try again."
end
end
You can’t perform that action at this time.