Skip to content

Instantly share code, notes, and snippets.

View diptangsu's full-sized avatar
:octocat:
Don't forget to drink water

Diptangsu Goswami diptangsu

:octocat:
Don't forget to drink water
View GitHub Profile
@diptangsu
diptangsu / README-Template.md
Created December 18, 2017 16:42 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@diptangsu
diptangsu / views.py
Last active January 18, 2024 16:52 — forked from cansadadeserfeliz/views.py
Django: filter DatetimeField by today (max and min time)
# source: http://stackoverflow.com/questions/1317714/how-can-i-filter-a-date-of-a-datetimefield-in-django
from django.utils import timezone
today_min = datetime.combine(timezone.now().date(), datetime.today().time().min)
today_max = datetime.combine(timezone.now().date(), datetime.today().time().max)
objetcs_for_today = MyModel.objects.filter(date__range=(today_min, today_max))
@diptangsu
diptangsu / python_decorator_guide.md
Created January 17, 2019 17:32 — forked from Zearin/python_decorator_guide.md
The best explanation of Python decorators I’ve ever seen. (An archived answer from StackOverflow.)

NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.


Q: How can I make a chain of function decorators in Python?


If you are not into long explanations, see [Paolo Bergantino’s answer][2].

@diptangsu
diptangsu / cloudSettings
Last active August 28, 2020 06:13
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-08-19T12:50:46.549Z","extensionVersion":"v3.4.3"}
@diptangsu
diptangsu / .vimrc
Last active May 19, 2020 19:22
My .vimrc file that I found on the internet and shamelessly copied
" plugins
let need_to_install_plugins = 0
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
"autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
let need_to_install_plugins = 1
endif
call plug#begin()
@diptangsu
diptangsu / .zshrc
Created May 20, 2020 09:19
My .zshrc configuration file
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/disciple/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
{
"always_show_minimap_viewport": true,
"binary_file_patterns":
[
"*.dds",
"*.eot",
"*.gif",
"*.ico",
"*.jar",
"*.jpeg",