Skip to content

Instantly share code, notes, and snippets.


Nitish Garg nitish6174

View GitHub Profile
View Code analysis

Code analysis tools


  • pdb : The Python Debugger
  • cProfiler : Get profile for running time of various functions
  • KCacheGrind : Generate call graph of functions
  • valgrind : Profile memory usage by program
  • gperftools : Set of tools for performance profiling and memory checking. Generates a call graph output
  • pylint : Source code syntax & linting checker
  • pyreverse : Creates UML diagrams for python code. Included in pylint
nitish6174 / .vimrc
Last active Oct 8, 2016
Improve vim by installing vundle package manager, following plugins and using keyboard shortcuts
View .vimrc
" --------------------------------------------------
" Vundle package manager settings
" --------------------------------------------------
set nocompatible
filetype off
" ---------- Set path of vundle file ----------
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
nitish6174 /
Created Oct 4, 2016
List of useful Ubuntu Gnome extensions to install
  • Alternatetab (Ungroup windows of same type)
  • Applications menu (Windows OS style Applications menu)
  • Caffeine (Disable autosuspend)
  • Clipboard indicator (Clipboard history)
  • Drop down terminal (Alternative to Guake terminal)
  • Easyscreencast (Screen recording)
  • Laine (Control volume of each application)
  • Media keys (Music control buttons on topbar)
  • Media player indicator (Music controller for topbar)
  • Pixel saver (Brings title bar applications to topbar)
nitish6174 /
Last active Oct 4, 2016
List of dark themes for Ubuntu Gnome
  • Adapta
  • Arc
  • Flatabulous
  • Nebula
  • Numix
  • Paper
  • Super flat remix (Icon theme)
nitish6174 /
Last active Oct 4, 2016
List of useful Sublime text packages
  • Manager and explorer :
    • Package manager : To manage all your sublime packages
    • SideBarEnhancements : Gives an extensive menu for renaming, duplicating file etc from the file explorer pane (The left column)
  • Themes & Color schemes :
    • Monokai Extended
    • Predawn
    • Theme - Afterglow
    • Theme - Asphalt
    • Theme - Brogrammer
    • Theme - Flatland
nitish6174 /
Last active Oct 10, 2016
Git alias for a better commit visualizaion
  1. Add the following block in gitconfig file :
    graph1 = log --graph --abbrev-commit --decorate --format=format:'%C(blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(bold white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
    graph2 = log --graph --abbrev-commit --decorate --format=format:'%C(blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''%C(bold white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
  1. Now run git graph1 or git graph2 in your project folder to view a nice git log
nitish6174 /
Last active Oct 6, 2018
Settings to control mouse cursor using keyboard
  1. Open 'Settings' -> 'Universal Access' -> 'Pointing and clicking' -> 'Mouse keys'
  2. Turn that option ON
  3. Now you will be able to move cursor with numpad but the speed will be extremely slow.
  4. Run the following commands in terminal to set a good to do speed :
    sudo apt-get install xkbset
    xkbset ma 60 10 10 5 2
nitish6174 / bashrc
Last active Jun 12, 2017
Bash aliases for the lazy typers
View bashrc
## Add sudo wherever needed
## list all files in current directory
alias ll="ls -alh"
## apt shorthands
alias sau="sudo apt-get update"
alias sai="sudo apt-get install"
sar() {
sudo apt-get autoremove
nitish6174 /
Last active Nov 1, 2016
Commands to setup development tools on an Ubuntu server
sudo apt-get update
sudo apt-get upgrade
# --------------------------------------------------
# Basic programs
# --------------------------------------------------
sudo apt-get install openssh-server
sudo apt-get install vim
sudo apt-get install git
sudo apt-get install curl
You can’t perform that action at this time.