Skip to content

Instantly share code, notes, and snippets.


Aditya Srivastava IamAdiSri

View GitHub Profile
IamAdiSri / Microsoft.PowerShell_profile.ps1
Created Jun 3, 2019
Windows PowerShell Profile Snippets
View Microsoft.PowerShell_profile.ps1
# Loads the Visual Studio Developer Command Prompt environment into Powershell
$installationPath = "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
if ($installationPath -and (test-path "$installationPath\Common7\Tools\vsdevcmd.bat")) {
& "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -no_logo && set" | foreach-object {
$name, $value = $_ -split '=', 2
set-content env:\"$name" $value
echo "> Visual Studio Developer Command Prompt loaded onto environment."
IamAdiSri /
Last active Apr 5, 2019
Remote Jupyter Notebook - Server to Client Reverse Tunneling Script
if [ $# -lt 2 ] ; then
echo " <port on server> <port n local>"
echo "example: sh 8686 8989"
echo " <port on server> <port on local> <local ip> <user name>"
echo "example: sh 8686 8989 10.x.x.x username"
exit 1
IamAdiSri / Windows SSH
Created Jan 3, 2019
Setup Windows to accept SSH connections and Tunneling
View Windows SSH

Windows SSH Setup

The steps to enable both SSH and tunneling/port forwarding are as follows:

  1. Open Settings > Update and Security > For Developers.
  2. Click on the radio button for Developer mode; this will open up your system's port 22 and allow the SSH broker to start listening for incoming connections.
  3. If you just switched to Developer mode, restart your computer, and then follow step 1 again.
  4. Under Device discovery turn on the option labeled Make your device visible to USB connections and your local network.
  5. Under Device discovery turn on the option labeled User OpenSSH (Beta) server for remote deployment.
IamAdiSri /
Last active Jul 15, 2020
Pickling objects in Python3
class Pickler():
Conveniently pickle Python objects and load pickled objects.
def save(self, obj, loc):
obj = Python object to be pickled.
loc = Location where pickled object will be saved.
IamAdiSri / Python3, Pip3, Virtualenv and Virtualenvwrapper Setup
Last active Jul 20, 2020 — forked from evansneath/Python3 Virtualenv Setup
Setting up and using Python3, Pip3, Virtualenv (for Python3) and Virtualenvwrapper (for Python3)
View Python3, Pip3, Virtualenv and Virtualenvwrapper Setup
First install pip for Python2. Download the file from
$ cd <download location>
$ sudo -H python ./
Installing pip also installs Python3
To run Python3
$ python3
Install pip3 by just executing the same file as in the step above, but this time using Python3
$ sudo -H python3 ./
You can’t perform that action at this time.