Skip to content

Instantly share code, notes, and snippets.

View raghav4's full-sized avatar
🏠
Working from home

Raghav Sharma raghav4

🏠
Working from home
View GitHub Profile
@raghav4
raghav4 / clean_code.md
Created November 24, 2019 08:31 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@raghav4
raghav4 / git-commands.md
Last active March 11, 2020 13:39
git commands

Commands

  • git init - Initialize a git repository

  • git status - Gives the status of the git repository

  • git add <filename> - Add a file to the index

  • git add . - Add every file to the index

xattr -cr /Applications/Magnet.app
@raghav4
raghav4 / iterm2.md
Created October 25, 2019 05:30 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@raghav4
raghav4 / README.md
Created October 22, 2019 05:33 — forked from joyrexus/README.md
curl tutorial

An introduction to curl using GitHub's API.

Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin

Includes HTTP-Header information in the output

@raghav4
raghav4 / script.sh
Created October 9, 2019 20:39
Introduction to Shell Scripting
#! /bin/bash
# ECHO COMMAND
echo Hello World!
## Variables
# Convetion - Upper Case
NAME="RAGHAV"
echo "My Name is $NAME"
@raghav4
raghav4 / shortcuts.md
Created October 9, 2019 20:10
Shortcuts
  1. Opening Sublime Text from bash MacOS 10.8+

sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl

@raghav4
raghav4 / notes.md
Created October 8, 2019 14:38
Beginners guide to the Bash ⌨️

Bash

@raghav4
raghav4 / file1.txt
Created October 5, 2019 08:16
Created via API
Demo
@raghav4
raghav4 / osx_bootstrap.sh
Created October 5, 2019 06:44 — forked from codeinthehole/osx_bootstrap.sh
Script to install stuff I want on a new OSX machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Some apps don't have a cask and so still need to be installed by hand. These
# include:
#
# - Twitter (app store)