Skip to content

Instantly share code, notes, and snippets.

View stephen2m's full-sized avatar

Stephen Mutua stephen2m

View GitHub Profile
@stephen2m
stephen2m / AutoUpdateExampleHelper.cs
Created January 30, 2020 20:14 — forked from sbrl/AutoUpdateExampleHelper.cs
A simple automatic update system, written in C# for a blog post.
using System;
using System.Net;
using System.IO;
using System.IO.Compression;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Diagnostics;
using System.Text;
using System.Security.Cryptography;
using System.Security.Permissions;
@stephen2m
stephen2m / audit_mixin.py
Created March 14, 2020 07:42 — forked from ngse/audit_mixin.py
Rough attempt at implementing an audit log against Flask/Flask Login/SQLAlchemy models
# Requires use of Flask Login for the user tracking
# Implement by using AuditableMixin in your model class declarations
# e.g. class ImportantThing(AuditableMixin, Base):
import json
from flask_login import current_user
from sqlalchemy import event, inspect
from sqlalchemy.orm import class_mapper
from sqlalchemy.orm.attributes import get_history
@stephen2m
stephen2m / git-pull-recursive.sh
Created March 29, 2021 20:03 — forked from devp619/git-pull-recursive.sh
Lots of repos? Try "git-pull-recursive" to run "git pull" on all subfolders with a .git folder inside.Thanks to http://snipplr.com/view/62314/perform-git-pull-on-subdirectory-recursive/
# For use in a shell:
# Download this file to /usr/local/bin/git-pull-recursive, then chmod 755 it to install git-pull-recursive
find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && git pull" \;

Keybase proof

I hereby claim:

  • I am stephen2m on github.
  • I am stephenmutua (https://keybase.io/stephenmutua) on keybase.
  • I have a public key whose fingerprint is 128D B440 538A 08A6 5209 737C EA98 FFE0 A5F0 13E8

To claim this, I am signing this object: