Skip to content

Instantly share code, notes, and snippets.

View Ic3fr0g's full-sized avatar
🎯
Focusing

Mayur Hampiholi Ic3fr0g

🎯
Focusing
View GitHub Profile
@Ic3fr0g
Ic3fr0g / kill-process.sh
Created June 30, 2020 13:36
Kill processes
# Kill process by program-name
ps -ax | grep <program-name> | awk '{print $1}' | xargs kill
# Kill processes using port
lsof -i:<port> | awk 'NR!=1 {print $2}' | xargs kill
@Ic3fr0g
Ic3fr0g / changelog.py
Created June 26, 2019 09:06
CHANGELOG with tag annotations
import os
import re
import string
# Prerequisites:
#
# github_changelog_generator repo -t token --date-format '%Y-%m-%d %H:%M' -o 'CHANGELOG.md'
# git tag -l -n9 > a.txt
# All tags should be of type 'v\d[\.\w]*'
# https://github.com/gpakosz/.tmux
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license,
# without any warranty.
# Copyright 2012— Gregory Pakosz (@gpakosz).
# -- navigation ----------------------------------------------------------------
# if you're running tmux within iTerm2
# - and tmux is 1.9 or 1.9a
@Ic3fr0g
Ic3fr0g / pull_request_template.md
Last active April 27, 2020 06:33
Pull Request Template

What?

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

<KEYWORD> #ISSUE

Here's a list of valid \<KEYWORD\>

- Fixes/Fix/Fixed: Fixes an issue
@Ic3fr0g
Ic3fr0g / gitcommit-style.md
Last active January 21, 2019 10:40
Github commit message - Style guide

Github commit message - Style guide

[<COMMIT-TAG>] Imperative one-liner explaining commit (less than 80 chars)
<blank-line>
Description body which could include ordered and unordered lists
1. Lorem ipsum
2. Lorem ipsum
3. Lorem ipsum
@Ic3fr0g
Ic3fr0g / port-forwarding.sh
Last active December 14, 2018 14:01
Jupyter Notebook port forwarding over remote machines
# Port forward and ssh into the remote machine from your local terminal
ssh -L 8888:127.0.0.1:8888 user@remote-ip-address
# From remote machine
jupyter notebook --no-browser --port=8888
# From local machine browser access localhost:8888
# To make sure no other apps are running on that port
kill $(lsof -t -i:8888)
@Ic3fr0g
Ic3fr0g / data-science-setup.sh
Last active March 16, 2019 14:34
Setup for data science related dev on (>=) RHEL 7.6 (Maipo) and CentOS
# Need to be sudo to install the following
yum update
yum install -y wget bzip2 tmux
# Download and run anaconda3 for python3 and follow instructions
wget https://repo.continuum.io/archive/Anaconda3-5.3.1-Linux-x86_64.sh | sh
# Conda install essential datascience packages
conda update --all
conda install pandas numpy scipy scikit-learn keras tensorflow pytorch nltk matplotlib seaborn