Skip to content

Instantly share code, notes, and snippets.

View ericblue's full-sized avatar

Eric Blue ericblue

View GitHub Profile
@aadnk
aadnk / injectApi.py
Last active November 13, 2024 08:01
Inject a REST API into Streamlit by injecting into Tornado
import logging
import threading
from typing import Any, Dict, Iterable, Optional, Union
from tornado.routing import Rule, Matcher
_global_tornado_hook = None
_global_hook_lock = threading.RLock()
class CustomRule:
def __init__(self, path_pattern: Union[str, Matcher], handler_class: Any,
@dcode
dcode / import_dod_certs_mac.sh
Last active May 14, 2025 05:06
Install and trust DoD CA certificates on Mac OS X. Tested on Catalina and Mojave. *NOTE*: This should also enable CAC if you didn't override the system drivers.
#!/bin/bash
set -eu -o pipefail
export CERT_URL='https://dl.dod.cyber.mil/wp-content/uploads/pki-pke/zip/unclass-certificates_pkcs7_DoD.zip'
# Download & Extract DoD root certificates
cd ~/Downloads/ || exit 1
/usr/bin/curl -LOJ "${CERT_URL}"
@senning
senning / US Zip Codes from 2016 Government Data
Last active June 10, 2024 17:53 — forked from erichurst/US Zip Codes from 2013 Government Data
All US zip codes with their corresponding latitude and longitude coordinates.Comma delimited for your database goodness.Source: http://www.census.gov/geo/maps-data/data/gazetteer.html
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158345, -66.932911
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.445147, -66.559696
@yisraeldov
yisraeldov / paymo.js
Created August 14, 2014 13:52
Paymo 3.0 Javascript wrapper
//Paymo API
/**
* This is a quick wrapper for the Paymo 3.0 API
* Requires (jquery.rest)[https://github.com/jpillora/jquery.rest]
*
* Copyright (c) 2014 Yisrael Dov Lebow <lebow@lebowtech.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
@johnschrom
johnschrom / map-my-moves.R
Created May 8, 2014 23:59
Map Moves Data
library(ggplot2)
library(maps)
library(mapproj)
# Thanks to Ernesto at Quantified Self
# http://quantifiedself.com/2014/03/map-moves-data/
# This is set up take data from the "Tracks" export, using:
# https://labs.traqs.me/moves/
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active March 21, 2025 15:01
Backend Architectures Keywords and References