Skip to content

Instantly share code, notes, and snippets.

View karthikmurugadoss's full-sized avatar

karthikmurugadoss

View GitHub Profile
@karthikmurugadoss
karthikmurugadoss / setup_venv.sh
Last active August 9, 2019 21:44
Create Python3 virtual environment
#!/bin/bash
: '
Set up Python3 virtual environment
Usage:
./setup_venv.sh /path/to/venvs <venv-name>
'
sudo apt install -y python3-pip
sudo pip3 install --upgrade virtualenv
mkdir -p $1.venvs
@karthikmurugadoss
karthikmurugadoss / setup_nvtop.sh
Last active July 30, 2019 19:03
Install and set up nvtop for GPU monitoring
#!/bin/bash
: '
Install nvtop on a GPU-enabled machine to dynamically monitor GPU usage
https://github.com/Syllo/nvtop
'
sudo apt install -y cmake libncurses5-dev libncursesw5-dev git
cd /tmp/
git clone https://github.com/Syllo/nvtop.git
mkdir -p nvtop/build && cd nvtop/build
@karthikmurugadoss
karthikmurugadoss / .bashrc
Created April 12, 2019 02:03
Basic .bashrc configuration with colors and git support
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@karthikmurugadoss
karthikmurugadoss / init.el
Last active April 12, 2019 01:58
Custom init.el file for Spacemacs Configuration
;;; init.el --- Spacemacs Initialization File
;;
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
@karthikmurugadoss
karthikmurugadoss / startup.sh
Last active July 31, 2018 20:01
Setup Python3 virtual environment, install project requirements (within venv) and run Python code
#!/bin/bash
: '
Create a Python virtual environment and install dependencies present in requirements.txt file
Note: If requirements.txt includes environment variables (for installing from private git repos for example), these environment variables should be defined and exported before running this script.
Usage: bash startup.sh project1
'
project_name=$1
sudo apt install python3-venv
@karthikmurugadoss
karthikmurugadoss / git-release.sh
Created July 30, 2018 21:18
Create a GitHub release from the command line
#!/bin/bash
: '
Create and tag a release on GitHub. Your GitHub username and password will be prompted.
Adapted from:
https://github.community/t5/How-to-use-Git-and-GitHub/How-to-create-full-release-from-command-line-not-just-a-tag/td-p/6895
https://developer.github.com/v3/repos/releases/#create-a-release
Usage: bash git-release.sh v0.0.1 "First Release"
'