Skip to content

Instantly share code, notes, and snippets.

View urjeetpatel's full-sized avatar
🏠
Working from home

Urjeet Patel urjeetpatel

🏠
Working from home
View GitHub Profile
@urjeetpatel
urjeetpatel / butter_egg_masala_pav_recipe.md
Created December 23, 2022 18:00
Butter Egg Masala Pav

Butter Egg Masala Pav

Masala Pav is one of the favorite street foods of India. This is buttery and is filled with the goodness of egg and is bursting with flavors. Serve it with onions and lemons by the side and enjoy it hot.

Prep time: 15 mins

Cook time: 25 mins

Number of Servings: 2-3 persons

@urjeetpatel
urjeetpatel / docker-aliases.sh
Created February 8, 2022 19:15 — forked from jgrodziski/docker-aliases.sh
Useful Docker Aliases
############################################################################
# #
# ------- Useful Docker Aliases -------- #
# #
# # Installation : #
# copy/paste these lines into your .bashrc or .zshrc file or just #
# type the following in your current shell to try it out: #
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash
# #
# # Usage: #
@urjeetpatel
urjeetpatel / pdf_remove_pages.py
Created February 26, 2020 17:40
Use Python to remove pages from a pdf
#! /usr/bin/python3
import click
import PyPDF2
def parseIntSet(inputString):
selection = set()
invalid = set()
tokens = [x.strip() for x in inputString.split(",")]
for token in tokens:
@urjeetpatel
urjeetpatel / gist:60cee1e7dc509ead24e99f70de3b5bd7
Last active April 19, 2022 18:27 — forked from bergantine/gist:1119284
Python Random Password Generator (One Liner). #python #password
python -c "LENGTH=15;from secrets import choice;from string import printable; print(''.join([choice(printable.strip()) for i in range(LENGTH)]))"
@urjeetpatel
urjeetpatel / pelicanconf.py
Created April 3, 2019 20:05 — forked from webinista/pelicanconf.py
A Pelican configuration for having a home page and blog index or landing page.
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
# --------------------------------------
# Now compatible with Pelican 4.0.x!
# --------------------------------------
# Added by me
import time
@urjeetpatel
urjeetpatel / markdown.html
Created November 19, 2018 18:29
Local Storage Vue.js Markdown Editor
<html>
<head>
<script src="https://unpkg.com/marked@0.3.6"></script>
<script src="https://unpkg.com/lodash@4.16.0"></script>
<script src="https://unpkg.com/vue@latest/dist/vue.js"></script>
<script src="https://unpkg.com/vuex"></script>
</head>
<body>
<div id="app">
<a @click="clear">Reset to Default</a>
@urjeetpatel
urjeetpatel / merge_workbooks.ps1
Created October 23, 2018 18:43
merge workbooks into one sheet
[threading.thread]::CurrentThread.CurrentCulture = 'en-US'
$excel = New-Object -ComObject Excel.Application
$excel.Visible = $True
$excel.DisplayAlerts = $False
$folders = Get-ChildItem -Directory | select -ExpandProperty FullName
#Open up a new workbook
$dest = $excel.Workbooks.Add()
foreach ($folder in $folders)
{
@urjeetpatel
urjeetpatel / delete_blank_rows.ps1
Created October 23, 2018 16:27
Delete Blank rows for all excel files in the current folder and subfolders
[threading.thread]::CurrentThread.CurrentCulture = 'en-US'
$excel = new-object -com excel.application;
$excel.visible = $true
$folders = Get-ChildItem -Directory
foreach ($folder in $folders)
{
cd $folder.FullName
$files = Get-ChildItem -Filter *.xlsx

Keybase proof

I hereby claim:

  • I am violentmagician on github.
  • I am sudo6780 (https://keybase.io/sudo6780) on keybase.
  • I have a public key whose fingerprint is 3083 C564 00A9 A5D2 BDED 0F38 C6B3 721B FAF3 1F8A

To claim this, I am signing this object:

@urjeetpatel
urjeetpatel / move.py
Last active February 4, 2017 07:34 — forked from vadviktor/move.py
Python: move files to creation date named directories
#!/usr/bin/python3
import os, time, shutil, sys, calendar
dir = sys.argv[1]
os.chdir(dir)
for f in filter(os.path.isfile, os.listdir(os.curdir):
ftime = time.gmtime(os.path.getmtime(f))
ctime_dir = "{1}{0}{2}".format(os.sep,
ftime.tm_year,