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 / 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,
@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 / 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 / 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: #