Skip to content

Instantly share code, notes, and snippets.

View pavank's full-sized avatar
:octocat:

Pavan Keerthi pavank

:octocat:
View GitHub Profile
To install all currently supported python versions (python 3.6 is already pre-installed) including pip for Ubuntu 18.04 do the following:
# Install Python 3.7 System wide
echo "Installing Python 3.7..."
sudo -S add-apt-repository ppa:deadsnakes/ppa -y
sudo -S apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3.7 \
python3.7-dev \
@pavank
pavank / VSCode-Python Liniting
Last active January 15, 2024 08:39
PyLint Settings for VSCode
# pylint.rc file in workspace folder
========================================
[MASTER]
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code.
extension-pkg-whitelist=
# Add files or directories to the blacklist. They should be base names, not
#!/bin/bash
#Install dev tools
echo "Installing linux tools..."
sudo -S apt-get update && DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
build-essential \
software-properties-common \
sysfsutils rename unzip\
@pavank
pavank / README.md
Last active September 14, 2022 11:21 — forked from maelvls/README.md
Ubuntu, libsecret, git-credential-helper

Dealing with secrets

GNOME comes with libsecret. You can use libsecret to store your git credentials:

sudo apt install libsecret-1-0 libsecret-1-dev libglib2.0-dev
sudo make --directory=/usr/share/doc/git/contrib/credential/libsecret
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
# Ref - https://superuser.com/questions/573602/chrome-not-saving-passwords-and-not-auto-filling-existing-login-passwords/1325741#1325741
"""
If the settings to store passwords are enabled, but it still doesn't work, removing the password database might help.
Here are steps:
Quit Chrome.
@pavank
pavank / Manage Windows Firewall
Last active September 24, 2020 15:58 — forked from ig0774/gist:1068598
Manage Windows Advanced Firewall with PowerShell
Set-StrictMode -Version Latest
# Constants
if (!(Test-Path variable:\NET_FW_DISABLED)) { Set-Variable NET_FW_DISABLED -Option Constant $False }
if (!(Test-Path variable:\NET_FW_ENABLED)) { Set-Variable NET_FW_ENABLED -Option Constant $True }
if (!(Test-Path variable:\NET_FW_IP_PROTOCOL_TCP)) { Set-Variable NET_FW_IP_PROTOCOL_TCP -Option Constant 6 }
if (!(Test-Path variable:\NET_FW_IP_PROTOCOL_UDP)) { Set-Variable NET_FW_IP_PROTOCOL_UDP -Option Constant 17 }
if (!(Test-Path variable:\NET_FW_PROFILE_DOMAIN)) { Set-Variable NET_FW_PROFILE_DOMAIN -Option Constant 0x1 }
if (!(Test-Path variable:\NET_FW_PROFILE_PRIVATE)) { Set-Variable NET_FW_PROFILE_PRIVATE -Option Constant 0x2 }
if (!(Test-Path variable:\NET_FW_PROFILE_PUBLIC)) { Set-Variable NET_FW_PROFILE_PUBLIC -Option Constant 0x2 }
@pavank
pavank / Dropbox Network Drive Hack
Last active April 6, 2020 03:48
Dropbox Network Drive Hack
Follow these steps
============
1) Create a folder on local disk Eg: C:\Users\keerthip\Documents\Dropbox
2) Create a Drive Letter Mapping eg:(H:) to the folder path in windows with following command
subst H: C:\Users\keerthip\Documents\Dropbox
3) Install Dropbox desktop software in advanced Mode.
Select the new local drive H: and sync either selective folders or all folder to local drive ( which is original folder path)
4) Wait till content is fully synced from web account
5) Pause Syncing and Exit Dropbox
6) Delete local folder drive mapping with following command
@pavank
pavank / git_config
Created March 24, 2020 11:01
Git Configuration
Ref : https://news.ycombinator.com/item?id=22672682
You can also do a per-directory _global_ git configuration, e.g.
in .gitconfig, you say:
[user]
name = Me Myself
email = personal@example.com
signingkey = D34DB44F
@pavank
pavank / List Installed Apps on PC
Last active March 5, 2020 18:32
List out Installed Programs on PC
Get-WmiObject Win32_Product | Sort-Object Name | Select Name,version,Vendor |export-csv myprogramlist.csv
@pavank
pavank / Ubuntu Alternate-Config Python Versions
Created June 24, 2019 10:57
Manage various Python versions in Ubuntu
Python Configuration
======================
Find all versions : ls -ls /usr/bin/python*
Manage Active Version
==========================
Ref: http://web.mit.edu/6.00/www/handouts/pybuntu.html