Skip to content

Instantly share code, notes, and snippets.

View regarm's full-sized avatar

MANOJ KUMAR REGAR regarm

View GitHub Profile
@regarm
regarm / gist:f97cca69df78bcb5c594361533dadc7d
Created June 7, 2019 05:24 — forked from psayre23/gist:c30a821239f4818b0709
Runtime Complexity of Java Collections
Below are the Big O performance of common functions of different Java Collections.
List | Add | Remove | Get | Contains | Next | Data Structure
---------------------|------|--------|------|----------|------|---------------
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array
@regarm
regarm / .gitconfig
Created November 4, 2018 13:08
Git config file
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
[user]
name = Manoj Kumar Regar
email = regarmanojkumar@gmail.com
[alias]
a = add
ci = commit
# How to easily squash a forked branch relative to it's parent branch.
git reset $(git merge-base release MY_BRANCH)
# That's it. Now commit and push
brew install bash
sudo -s
echo /usr/local/bin/bash >> /etc/shells
chsh -s /usr/local/bin/bash
@regarm
regarm / Brewfile
Last active August 5, 2019 12:06
Brewfile
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-versions"
tap "homebrew/core"
tap "homebrew/services"
brew "aria2"
brew "bash"
brew "bat"
brew "xz"
brew "go"
@regarm
regarm / .vimrc
Last active November 29, 2017 15:10
set nocompatible " required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')