Skip to content

Instantly share code, notes, and snippets.

View sanketsaurav's full-sized avatar
🚀
Helping developers ship good code.

Sanket Saurav sanketsaurav

🚀
Helping developers ship good code.
View GitHub Profile
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active June 16, 2024 13:44
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@kirang89
kirang89 / animorphs-downloader.py
Last active January 5, 2024 14:15
Script to download single book or the entire series of Animorphs. Relive your childhood !
#!/usr/bin/env python
# -*- coding: utf-8 -*-
################################################
# #
# Script to download entire animorphs series #
# #
# Usage: python animorphs-downloader.py --help #
# #
#################################################
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active April 17, 2024 10:51
Backend Architectures Keywords and References
@bnmnetp
bnmnetp / simpleskulpt.html
Last active October 15, 2023 09:11
Here is about the simplest example I can think of that gets you a working skulpt environment. This little sample shows regular python as well as importing a module.
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js" type="text/javascript"></script>
<script src="http://www.skulpt.org/js/skulpt.min.js" type="text/javascript"></script>
<script src="http://www.skulpt.org/js/skulpt-stdlib.js" type="text/javascript"></script>
</head>
<body>
@mindlace
mindlace / middleware.py
Created October 19, 2012 13:43
Add user created/modified to every model
"""Add user created_by and modified_by foreign key refs to any model automatically.
Almost entirely taken from https://github.com/Atomidata/django-audit-log/blob/master/audit_log/middleware.py"""
from django.db.models import signals
from django.utils.functional import curry
class WhodidMiddleware(object):
def process_request(self, request):
if not request.method in ('GET', 'HEAD', 'OPTIONS', 'TRACE'):
if hasattr(request, 'user') and request.user.is_authenticated():
user = request.user
@stefanv
stefanv / sparks.py
Created November 17, 2011 00:25
Command line sparks in Python
#!/usr/bin/python
# coding=utf-8
# Python version of Zach Holman's "spark"
# https://github.com/holman/spark
# by Stefan van der Walt <stefan@sun.ac.za>
"""
USAGE: