Skip to content

Instantly share code, notes, and snippets.

View prameshbajra's full-sized avatar
💻
Let's talk tech.

Pramesh Bajracharya prameshbajra

💻
Let's talk tech.
View GitHub Profile
@prameshbajra
prameshbajra / pramesh.omp.json
Created June 20, 2021 07:33
Oh my posh configuration file. Needs nerd fonts to work flawlessly.
{
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "session",
"style": "diamond",
"foreground": "#ffffff",
@prameshbajra
prameshbajra / settings.json
Created September 1, 2020 08:10
VSCode workspace configuration for Python projects.
// This is configuration for VSCode such that the `go to definitions` work for the current project.
// Side Note: The PYTHONPATH for the current project was set.
{
"python.formatting.provider": "autopep8",
"python.linting.enabled": true,
"python.pythonPath": "<VENV_PATH>\\Scripts\\python.exe",
"python.languageServer": "Microsoft"
}
@prameshbajra
prameshbajra / Jupyter Notebook Dank Mono.css
Last active August 28, 2020 11:21
Dank Mono Entities
div#notebook {
color: #f8f8f0;
font-family: 'Dank Mono' sans-serif; font-style:italic;
font-size: 9pt;
line-height: 170%;
padding-top: 25px !important;
zoom: 110%;
-webkit-font-smoothing: antialiased !important;
}
@prameshbajra
prameshbajra / Python Virtual Env
Last active December 6, 2020 14:53
My personal python environment setup.
virtualenv venv -p python3.6
// Activate the created venv ...
pip install ipykernel
pip install notebook
pip install jupyter_contrib_nbextensions
pip install autopep8
pip install yapf
@prameshbajra
prameshbajra / Terminal settings
Created August 6, 2020 08:52
Setting for windows terminal
// This file was initially generated by Windows Terminal 1.0.1811.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@prameshbajra
prameshbajra / GmailTemplateFooter.html
Created July 15, 2020 06:49
Send beautiful email to others using this footer.
<div style="background-color: #3385ff;
bottom: 0;
position: fixed;
text-align: center;
width: 100%;
padding: 20px 0 0 0;
margin-left: -8px;">
<a href="https://prameshbajra.github.io" target="_blank" style="color: white;
font-family: consolas;
font-size: 2.5em;
<mxfile host="app.diagrams.net" modified="2020-05-15T19:55:03.379Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36" etag="KWAAKfc1jvhACMIfshkV" version="13.1.1" type="device"><diagram name="Page-1" id="c7488fd3-1785-93aa-aadb-54a6760d102a">7LvXsuRIkiX4NS37NC3g5BGAg3PmIG/gnHN8/QA3IrMqq2p6emenZWRX9kqEO2CAmxlU1VTPUVP8G8x0Jz9HY6kOadb+GwSk57/Bn3+DIBCAiefrbbl+taDI74ZirtLfN/2twa7u7I9f/m7dqjRb/nLjOgztWo1/bUyGvs+S9S9t0TwPx19vy4f2r6OOUZH9U4OdRO0/t3pVupa/W0EA+NsFIauK8vfQBPr7QhwlTTEPW/97vH+D4Pzn79flLvqjr9/3L2WUDsffNcHsv8HMPAzrr6PuZLL2le0fYvv1O+5/cPXPec9Zv/5nfgDFSEaAEBkDUIoQeP7ffvewR+32WxbMo1016tc5+r+W58ony8bnS8miua/64jnk2ucJngtVVMxR9/u51usPWS5H1bVR/5zR5dq1TyP4HCZl1aZKdA3bO89lfeT2xxldDnN1D/0a/XHzc3lef1vJ80B/f4f9/vJpflt/5J6lv8/+FO170kZx1tJ/KocZ2mF+LvXDz7yWdR6aPzX9jpg/nXNRV7WvAX+zOY366Hfz73kQz2nUVkX/HCePtLP5vV617R99P6rHgIgE8T8H+Lsr0AfHAOB3j3/X/ttYYPqfFfmHZrJ5zc6/a/qtWD4bumydr+eWP64Sv43s9yIE4d/nx99MGoeRfwfQX83l3xk0CGK/b45+L6Xiz/7/Zk7PwW+L+k9aF/RP1vWJ1uhpeUTQ
@prameshbajra
prameshbajra / Assets.java
Last active January 27, 2020 10:06
Clone an Object/Arraylist in java.
import java.util.Date;
import java.util.List;
public class Assets {
public String formatId;
public String formatName;
public String assetId;
@prameshbajra
prameshbajra / available_ip.md
Created January 7, 2020 14:08
Gives the list of IPs that are Busy or Open.

Execute this by:

(777 might be an over kill for this one) sudo chmod 777 available_ip.sh

./available_ip.sh

@prameshbajra
prameshbajra / available_ip.sh
Created January 7, 2020 14:07
Gives the list of IPs that are Busy or Open.
#!/bin/sh
# Uncomment for debugging
#set -x
pingf(){
if ping -w 2 -q -c 1 192.168.1."$1" > /dev/null ;
then
printf "IP %s is up\n" 192.168.1."$1"
else
printf "IP %s is open\n" 192.168.1."$1"
fi