Skip to content

Instantly share code, notes, and snippets.

View sh4nks's full-sized avatar

Peter Justin sh4nks

View GitHub Profile
# MS Tracking
0.0.0.0 a.ads1.msn.com
0.0.0.0 a.ads2.msads.net
0.0.0.0 a.ads2.msn.com
0.0.0.0 a.rad.msn.com
0.0.0.0 a-0001.a-msedge.net
0.0.0.0 a-0002.a-msedge.net
0.0.0.0 a-0003.a-msedge.net
0.0.0.0 a-0004.a-msedge.net
@sh4nks
sh4nks / dev_run.py
Created August 23, 2020 16:44 — forked from skariel/dev_run.py
hot reloading automation for sqlc, quicktemplates etc
#!python -u
import os
import sys
import glob
import time
import signal
import queue
from subprocess import Popen, getoutput, PIPE
from multiprocessing import Process, Queue
from watchdog.observers import Observer
@sh4nks
sh4nks / audit_mixin.py
Created December 4, 2020 10:15 — forked from mjhea0/audit_mixin.py
Useful SQLAlchemy Mixins
from datetime import datetime
from sqlalchemy import Column, Integer, DateTime, ForeignKey
from sqlalchemy.orm import relationship
from sqlalchemy.ext.declarative import declared_attr
from flask_security import current_user
class AuditMixin(object):
created_at = Column(DateTime, default=datetime.now)
updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now)
@sh4nks
sh4nks / cli.py
Created December 9, 2020 09:23
flask shell with ipython
def get_version(ctx, param, value):
if not value or ctx.resilient_parsing:
return
message = (
"<project> %(version)s using Flask %(flask_version)s on "
"Python %(python_version)s"
)
click.echo(
message
% {
@sh4nks
sh4nks / Dracula.sublime-color-scheme
Created February 4, 2021 14:37
Dracula Color Scheme customizations
// Documentation at https://www.sublimetext.com/docs/color_schemes.html
{
"variables":
{
},
"globals":
{
},
"rules":