Skip to content

Instantly share code, notes, and snippets.

View snambi's full-sized avatar

Nambi Sankaran snambi

View GitHub Profile
@snambi
snambi / screen.md
Last active September 8, 2020 18:09
How to use "screen" between two users

Using screen in Linux

This gist provides two methods to use screen in Linux. The first method is easy, but it is less secure as it uses sudo privileges. The second method is hard, but the correct way to share a screen between two users.

Install "screen"

sudo apt update
@snambi
snambi / kube.md
Last active July 22, 2020 01:02
Kubernates Commands - Cheat Sheet

minikube

basic commands

minikube version
minikube start

kubectl

@snambi
snambi / pyproject.toml
Created June 5, 2020 21:31
pyproject: dependencies hosted in internal artifactory
[tool.poetry]
name = "nlp_fasttext"
version = "0.1.0"
description = ""
authors = ["Nambi Sankaran <snambi@gmail.com>"]
[tool.poetry.dependencies]
python = "3.7.0"
fasttext = "0.9.2"
flask_restx = "0.2.0"
@snambi
snambi / gist:e0c41aebdc6a21748db097eb4ad48c35
Created March 9, 2020 16:33 — forked from pcgeek86/gist:a1fd9d26f8ad46b51adf9513f67b95f2
Install & test Selenium with Firefox / Gecko driver on headless Ubuntu 18.04 LTS server
sudo apt update
sudo apt install firefox python3-pip xvfb x11-utils --yes
sudo -H pip3 install bpython selenium
export DISPLAY=:2
Xvfb $DISPLAY -ac &
export GECKO_DRIVER_VERSION='v0.24.0'
wget https://github.com/mozilla/geckodriver/releases/download/$GECKO_DRIVER_VERSION/geckodriver-$GECKO_DRIVER_VERSION-linux64.tar.gz
tar -xvzf geckodriver-$GECKO_DRIVER_VERSION-linux64.tar.gz
@snambi
snambi / .bashrc
Last active August 14, 2021 23:21
Bash Setup
set -o vi
#stty erase ^H
alias xb="xterm -fg lightgreen -bg black -sl 5000 -sb -T dark &"
alias xg="xterm -fg lightgreen -bg grey20 -sl 5000 -sb -T dark &"
alias xa="xterm -fg black -bg white -sl 5000 -sb -T white &"
alias xc='xterm -fg black -bg bisque -sl 5000 -sb -T white &'
alias function="typeset -f"
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
user haproxy
group haproxy
daemon
defaults
log global
@snambi
snambi / haproxy.cfg
Created March 30, 2017 23:11
ha-proxy configuration
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
user haproxy
group haproxy
daemon
defaults
log global
@snambi
snambi / set-input.sh
Created March 12, 2017 21:06
Set Mouse, Touch pad properties
# increase the trackpad tracking speed ( increase it by 4 times )
xinput --set-prop 13 171 4.000000, 0.000000, 0.000000, 0.000000, 5.000000, 0.000000, 0.000000, 0.000000, 1.000000
# increase the apple mouse tracking speed ( increase it by 4 times )
xinput --set-prop 18 171 4.000000, 0.000000, 0.000000, 0.000000, 5.000000, 0.000000, 0.000000, 0.000000, 1.000000
## enable tap-to-click
xinput --set-prop 13 306 1
@snambi
snambi / xinput-set-prop.sh
Created March 12, 2017 20:29
Set properties
xinput --set-prop 15 171 4.000000, 0.000000, 0.000000, 0.000000, 5.000000, 0.000000, 0.000000, 0.000000, 1.000000