Skip to content

Instantly share code, notes, and snippets.

View paneru-rajan's full-sized avatar
🇳🇵

Rajan Paneru paneru-rajan

🇳🇵
View GitHub Profile
@paneru-rajan
paneru-rajan / django-webpack.md
Created June 27, 2018 17:56
webpack.config.js, package.json sample for a typical project

Package Json file

Filename package.json

{
  "name": "rane_monitoring_django_app",
  "version": "1.0.0",
  "description": "Web application for RANE",
  "main": "index.js",
  "scripts": {
@paneru-rajan
paneru-rajan / remove-file.md
Last active July 7, 2018 06:54
[Git Remove one file form entire repository and history] When some file mistakenly added on git, and after many commits you come to realize that the file was not supposed to be there #git #remove-file #bitbucket #github

Remove file form git history and current head (Remove Completely)

Note: I have tested this on my bitbucket dummy repo

I have mistakely added password on README.md and after many commits, I was reminded what I have done. So the below stuff is to correct my fault

Download from here

wget http://repo1.maven.org/maven2/com/madgag/bfg/1.13.0/bfg-1.13.0.jar
@paneru-rajan
paneru-rajan / lepton-on-ubunut.md
Created July 13, 2018 12:35
[Install Lepton in ubuntu] Installing Lepton in ubuntu 18 #ubuntu #lepton #gist

Steps To install Lepton on ubunut

I have installed in ubunut 18

Goto Releases page on Github and get latest file having .AppImage in end and replace that with mine in below code:

cd /opt/
sudo wget https://github.com/hackjutsu/Lepton/releases/download/1.6.3-beta/Lepton-1.6.3-beta.1-x86_64.AppImage
sudo chmod a+x Lepton-1.6.3-beta.1-x86_64.AppImage
sudo ./Lepton-1.6.3-beta.1-x86_64.AppImage
@paneru-rajan
paneru-rajan / tunnel-mysql-login.sh
Created October 17, 2019 05:05
[Use SSH tunnel to login into DB] You can use tunnel form cli to login to dbs #login-mysql #login-using-tunnel #mysql #tunnel
# you need to have mysql-client in your local
ssh -f rane-bastion-api -L 3307:db-host:3306 -N
mysql -u rajan_p -h 127.0.0.1 -P 3307 -p
@paneru-rajan
paneru-rajan / gnome-terminal.md
Last active February 2, 2022 08:00
[One Instance Gnome Terminal] #gnome-terminal #terminal

Force Only one instance of Gnome Terminal

I use tmux and I prefer only one instance of gnome-terminal open all the time. With the following script I achieve:

  1. Open a new terminal if there is no any terminal opened
  2. If terminal is already opened it will bring that terminal to the active workspace and focuses it
  3. If you execute script sitting on the active terminal, it minimizes the terminal

Steps: