Skip to content

Instantly share code, notes, and snippets.

View maanavshah's full-sized avatar

Maanav Shah maanavshah

View GitHub Profile
@maanavshah
maanavshah / README.md
Created August 26, 2018 16:36
Ruby on Rails Interview Question

Ruby on Rails

What are the advantages of using Ruby on Rails in Web Development?
What are the disadvantages of using Ruby on Rails in Web Development?
What do you mean by Agile Development?
@maanavshah
maanavshah / install.sh
Last active September 23, 2019 13:19
Install and Configure Ruby on Rails, MongoDB, PostgreSQL, Git, Sublime Text, Oh-my-zsh and Deepin on Ubuntu
#!/bin/bash
sudo apt-get update
# To make sure we have everything necessary for Webpacker support in Rails, we're first going to start by adding the Node.js and Yarn repositories to our system before installing them.
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
@maanavshah
maanavshah / pre-commit
Created October 4, 2018 13:56
Pre-commit hook to avoid debugger commands - Ruby
# This script verifies if a list of "blacklist" words are presented in the files you are intended to commit such console
# output, debugging information or keys/tokens/passwords
# Instructions:
# Put this file into your .git/hooks folder and set as executable (chmod +x pre-commit)
# If you want to skip the hook just add the --no-verify: git commit --no-verify
# ---------------------------------------------
@maanavshah
maanavshah / change_author_all_commits.sh
Created February 26, 2020 09:41
Update author of all commits in a git repository
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="maanav@getwalnut.com"
CORRECT_NAME="maanav"
CORRECT_EMAIL="shah.maanav.07@gmail.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
@maanavshah
maanavshah / imagenet1000_clsidx_to_labels.txt
Created May 6, 2020 07:45 — forked from yrevar/imagenet1000_clsidx_to_labels.txt
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@maanavshah
maanavshah / System Design.md
Created October 29, 2020 12:25 — forked from vasanthk/System Design.md
System Design Cheatsheet

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?