Skip to content

Instantly share code, notes, and snippets.

View nitish6174's full-sized avatar

Nitish Garg nitish6174

View GitHub Profile
@nitish6174
nitish6174 / server_setup.md
Last active November 1, 2016 08:44
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
@nitish6174
nitish6174 / bashrc
Last active June 12, 2017 01:02
Bash aliases for the lazy typers
## 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
nitish6174 / mouse_cursor_using_keyboard.md
Last active October 6, 2018 19:12
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
nitish6174 / .gitconfig
Last active April 11, 2022 05:13
Git aliases
[alias]
s = status
a = add
d = diff
dc = diff --cached
dd = difftool --tool=vimdiff -y
c = commit
ps = push
pl = pull
co = checkout
@nitish6174
nitish6174 / sublime_packages.md
Last active October 4, 2016 10:38
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
nitish6174 / ubuntu-gnome-themes.md
Last active October 4, 2016 19:36
List of dark themes for Ubuntu Gnome
  • Adapta
  • Arc
  • Flatabulous
  • Nebula
  • Numix
  • Paper
  • Super flat remix (Icon theme)
@nitish6174
nitish6174 / ubuntu-gnome-extensions.md
Created October 4, 2016 19:29
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
nitish6174 / .vimrc
Last active April 4, 2022 12:11
Improve vim by installing vundle package manager, following plugins and using keyboard shortcuts
" Steps
" =====
" 1. Add below content to your .vimrc
" 2. Clone vundle : `git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim`
" 3. Run :PluginInstall in vim
" --------------------------------------------------
" Vundle package manager settings
" --------------------------------------------------

PyInstrument

from pyinstrument import Profiler
profiler = Profiler()

profiler.start()

# --- code to profile : start ---
# e.g. :-

Remove trailing whitespace from files

sed -i 's/[ \t]*$//' folder/*/*.py

Convert Jupyter notebook to PPT

# General use-case
jupyter nbconvert --to slides filename.ipynb
# Code-free conversion