Skip to content

Instantly share code, notes, and snippets.

💩
creating tech debt

Brady Law babldev

💩
creating tech debt
Block or report user

Report or block babldev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@babldev
babldev / github.sh
Created Apr 5, 2019
Open commit on github v2
View github.sh
#!/bin/sh
REPO=$(git config --get remote.origin.url | sed "s/^.*://" | sed "s/\.git\$//")
open https://github.com/$REPO/commit/$1
@babldev
babldev / auto_refreshing_cache.py
Last active May 13, 2016
A non-blocking, auto-updating cache.
View auto_refreshing_cache.py
"""
A non-blocking, auto-updating cache.
Consider the following requirements:
- You need a cache that takes a long time to build.
- The creation of the cache is CPU bound.
- The cache needs to be rebuilt at some regular interval.
- The cache is receiving constant queries, and you do not want any blocking while it is rebuilding.
This example provides a solution to such requirements, including:
@babldev
babldev / decode_flask_cookie.py
Last active Aug 17, 2019
Decode a Flask Session cookie, given the cookie and secret key
View decode_flask_cookie.py
You can’t perform that action at this time.