Skip to content

Instantly share code, notes, and snippets.

@pandeykartikey
pandeykartikey / vps-transmission.sh
Created October 22, 2022 18:11
vps-transmission
### script.sh
sudo adduser "$USER"
sudo usermod -aG sudo "$USER"
su "$USER"
mkdir -p ~/.ssh
echo "###########################################################"
echo "Upload id_rsa.pub to ~/.ssh/authorized_keys and press ENTER"
echo "###########################################################"
read -rsn1 -p ""; echo
@pandeykartikey
pandeykartikey / config.md
Created September 7, 2018 15:49 — forked from 0XDE57/config.md
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable.

I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@pandeykartikey
pandeykartikey / draw_neural_net.py
Created May 24, 2018 15:33 — forked from craffel/draw_neural_net.py
Draw a neural network diagram with matplotlib!
import matplotlib.pyplot as plt
def draw_neural_net(ax, left, right, bottom, top, layer_sizes):
'''
Draw a neural network cartoon using matplotilb.
:usage:
>>> fig = plt.figure(figsize=(12, 12))
>>> draw_neural_net(fig.gca(), .1, .9, .1, .9, [4, 7, 2])
@pandeykartikey
pandeykartikey / Keybase
Created April 2, 2018 13:40
Keybase Proof
### Keybase proof
I hereby claim:
* I am pandeykartikey on github.
* I am pandeykartikey (https://keybase.io/pandeykartikey) on keybase.
* I have a public key whose fingerprint is 77BD 424F A1EC A77E EF12 0900 338F E108 2CAB CE42
To claim this, I am signing this object:
@pandeykartikey
pandeykartikey / UbuntuSetup.sh
Last active March 22, 2018 17:35
This is my Setup script for a fresh ubuntu install
sudo apt-get update
sudo apt-get upgrade
# Basic Utilities
sudo apt-get install -y terminator &&
sudo apt-get install -y git &&
sudo apt-get install -y vim &&
sudo apt-get install -y curl
# zsh
@pandeykartikey
pandeykartikey / checkPPAs
Created August 4, 2017 20:53
Script to remove unused ppa. (Its a copied script from askubuntu https://askubuntu.com/questions/674976/check-for-and-remove-unused-ppas)
#!/usr/bin/env bash
for f in /etc/apt/sources.list.d/*.list; do
grep -Po "(?<=^deb\s).*?(?=#|$)" "$f" | while read -r ENTRY ; do
echo "ENTRY: $ENTRY"
HOST=$(cut -d/ -f3 <<< "$ENTRY")
if [ "ppa.launchpad.net" = "$HOST" ]; then
USER=$(cut -d/ -f4 <<< "$ENTRY")
PPA=$(cut -d/ -f5 <<< "$ENTRY")
packageCount=$(awk '$1=="Package:" {if (a[$2]++ == 0) {system("dpkg -l "$2)}}' /var/lib/apt/lists/*"$USER"*"$PPA"*Packages 2>/dev/null | awk '/^ii/' | wc -l)