Skip to content

Instantly share code, notes, and snippets.

@koepnick
koepnick / 0_reuse_code.js
Created April 10, 2016 17:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@koepnick
koepnick / some.advancedsite.com.conf
Created April 29, 2020 06:38
NGINX Boilerplate - Django/JS Frontend
# A fully working dev example
# This assumes that:
# A (in my case Vue) JS dev server is listening on port :8080 and is in charge of all look and feel loveliness
# it also assumes that a Django dev server is running on port :8000 and has the sole purpose of being an API server
# The websockets stanza can be omitted if it isn't applicable
# Any documents in /static will be served...well statically
# `manage.py collectstatic` *should* copy the Django static files here so long as:
@koepnick
koepnick / demo.ipynb
Created January 1, 2021 21:44
Connecting Colab to an external storage provider
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@koepnick
koepnick / demo.py
Last active January 15, 2021 22:26
Connecting to a remote S3 endpoint
"""
This is useful for applications such as Google's Colab which
have simple methods of connecting to each user's invdivdiual
cloud storage, but the speed and latency are terrible.
With this, you can use a much snappier service such as Wasabi
to host large files for machine learning consumption
Regular users: `pip install --user s3fs`
Virtualenv users: `pip install s3fs`
@koepnick
koepnick / bitmasking
Last active January 31, 2021 01:23
attiny85_interrupt_bitmasking_example.cpp
// Hopefully this will make some amount of sense.
// PCIE in the ATTiny85 headers simply expands to 5, but pretend for a moment
// that it is an unknown constant
GIMSK |= (PCIE << 6); /* <-- Use this! It's confusing as hell, especially given that the OR operator
acts more like addition in that:
00100010 | [34]
10000010 [130]
________
tab-item.active {
height: 39px !important;
background-color: #444444;
}
tab-item.active .label-content {
font-weight: bold;
font-size: 14px;
}
tab-item.active tab-twisty,
tab-item.active .label-content,
version: '3.7'
services:
sonarr:
container_name: sonarr
image: linuxserver/sonarr:3.0.6.1265-ls121
restart: "no"
ports:
- "8989:8989"
environment:
- TZ=America/Denver
pprintex Pretty print but for objects
objexplore What is says on the tin
tracers Trace when class attributes change
pdb++ (pdbpp) Yet another pdb replacement
bracelogger Brace style string formatting in logs