Skip to content

Instantly share code, notes, and snippets.

View ETMayberry's full-sized avatar

Eric Mayberry ETMayberry

  • Silver Spring, MD
View GitHub Profile
@ETMayberry
ETMayberry / track_branches.ps1
Created May 21, 2020 02:20
Powershell 7: Track remote git branches without pulling
(git branch -r) -replace "origin/", "" | foreach { git branch -t ($_.split(' ', [StringSplitOptions]'RemoveEmptyEntries')[0]) "origin/$($_.split(' ', [StringSplitOptions]'RemoveEmptyEntries')[0])" }
@ETMayberry
ETMayberry / web_server.py
Last active June 15, 2018 11:57
Cat-Facts Server with Flask and SQLite3
# References:
# http://flask.pocoo.org/docs/1.0/quickstart/#a-minimal-application
# http://www.sqlitetutorial.net/sqlite-python/sqlite-python-select/
# http://flask.pocoo.org/docs/1.0/patterns/sqlite3/
import sqlite3
from random import randint
from flask import Flask, g