Skip to content

Instantly share code, notes, and snippets.

View blpabhishek's full-sized avatar
💭
Working

Abhishek Gupta blpabhishek

💭
Working
View GitHub Profile
@blpabhishek
blpabhishek / .zshrc
Created June 4, 2021 14:32
Updated .zshrc
export HOMEBREW_NO_GITHUB_API=1
export HOMEBREW_NO_ANALYTICS=1
export N_PREFIX=~/.n
#zmodload zsh/zprof
# Handle Zsh history
export HISTFILE=~/.zsh_history
export HISTSIZE=15000
export SAVEHIST=10000
setopt BANG_HIST # Treat the '' character specially during expansion.
@blpabhishek
blpabhishek / .vimrc
Created May 17, 2021 14:18
basic vimrc
syntax on
colo desert
set nocompatible
set ruler
set nu
set expandtab
set tabstop=2
set shiftwidth=2
filetype indent plugin on

Keybase proof

I hereby claim:

  • I am blpabhishek on github.
  • I am blpabhishek (https://keybase.io/blpabhishek) on keybase.
  • I have a public key whose fingerprint is A4F9 C550 A2AE 3CED 2B73 51D4 0400 2DBA 6899 71C5

To claim this, I am signing this object:

@blpabhishek
blpabhishek / switch-safari.scpt
Created March 7, 2020 14:57
Switch Safari's 5 opened tabs on 2 second delay.
tell application "Safari"
activate
set counter to 0
repeat
set counter to (counter + 1)
tell front window of application "Safari" to set current tab to tab (counter)
delay 2
set counter to (counter mod 5)
end repeat
end tell
@blpabhishek
blpabhishek / hello.sh
Created December 21, 2019 04:46
ssh key encryption
ssh-keygen -m PEM -t rsa -b 4096
openssl rsa -in identity -pubout
echo content | openssl rsautl -encrypt -pubin -inkey identity.pub.pem > ciphertext.txt
openssl rsautl -decrypt -inkey identity -in ciphertext.txt
@blpabhishek
blpabhishek / generate_pem
Created December 17, 2018 17:24
Generate private and public key pair
openssl genrsa -out private.pem 2048
openssl rsa -in private.pem -outform PEM -pubout -out public.pem
@blpabhishek
blpabhishek / ssh_Proxy.sh
Created December 17, 2018 10:33
ssh Proxy
ssh -i ${KEY_FILE} -o ProxyCommand="ssh -i ${KEY_FILE} $2@bastion.$1.example.com nc %h %p" $2@$3 $4
@blpabhishek
blpabhishek / download-sqs.py
Created December 5, 2018 08:29
This script downloads messages from AWS Queue to a folder
import argparse
import boto.sqs
import json
import os
parser = argparse.ArgumentParser(description='Saves all messages from an AWS SQS queue into a folder.')
parser.add_argument(
'-q', '--queue', dest='queue', type=str, required=True,
help='The name of the AWS SQS queue to save.')
@blpabhishek
blpabhishek / .envrc
Created December 3, 2018 12:10
.envrc for golang
export GOENV_VERSION=1.10.3
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
export PATH=/usr/local/opt/[email protected]/bin:$PATH
@blpabhishek
blpabhishek / .zshrc
Created September 16, 2018 17:19
zshrc
export HOMEBREW_NO_GITHUB_API=1
export HOMEBREW_NO_ANALYTICS=1
export N_PREFIX=~/.n
# Handle Zsh history
export HISTFILE=~/.zsh_history
export HISTSIZE=10000000
export SAVEHIST=10000000
setopt BANG_HIST # Treat the '!' character specially during expansion.