Skip to content

Instantly share code, notes, and snippets.

View jbx09's full-sized avatar

Balaji Balakrishnan jbx09

View GitHub Profile
@jbx09
jbx09 / ansible-github.yml
Created November 1, 2022 12:08 — forked from devynspencer/ansible-github.yml
Example playbook for cloning a private git repository with Ansible.
---
hosts: all
tasks:
- name: add github ssh key
copy: >
src=files/id_rsa.github
dest=/root/.ssh/id_rsa.github
owner=root
group=root
@jbx09
jbx09 / audit_mixin.py
Created October 30, 2022 11:02 — 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