Skip to content

Instantly share code, notes, and snippets.

View NinjaBunny9000's full-sized avatar

Krissy Heishman NinjaBunny9000

View GitHub Profile
@NinjaBunny9000
NinjaBunny9000 / import_envs.py
Created February 1, 2022 16:22
There are two methods to using env variables with the `python-dotenv` package.. ## Method 1 This loads them into the "os" environment variables (for that particular instance of python that your code is executing in). - You can reference them as you
import os
from dotenv import load_dotenv, dotenv_values
# method 1)
load_dotenv() # load
# ref
os.getenv('VARIABLE_NAME', default='alternate_value') # specifying a default value to fall back on if env var is missing
os.env['VARIABLE_NAME'] # may return None
@NinjaBunny9000
NinjaBunny9000 / HUErgbToXy.js
Last active May 14, 2023 13:24
[js] RGB to XY Colorspace (Hue ColorGamut)
// This is based on original code from http://stackoverflow.com/a/22649803
// with special credit to error454's Python adaptation: https://gist.github.com/error454/6b94c46d1f7512ffe5ee
function EnhanceColor(normalized) {
if (normalized > 0.04045) {
return Math.pow( (normalized + 0.055) / (1.0 + 0.055), 2.4);
}
else { return normalized / 12.92; }
}

Keybase proof

I hereby claim:

  • I am ninjabunny9000 on github.
  • I am ninjabunny9000 (https://keybase.io/ninjabunny9000) on keybase.
  • I have a public key ASBzAf5FuCo9Hv0TVA3FdLhAgzX5k8Ql3c60tiSCGSPy6Ao

To claim this, I am signing this object:

@NinjaBunny9000
NinjaBunny9000 / sfx.md
Last active September 14, 2019 22:38
NinjaBunny9000 Stream SFX Commands

SFX Command List

Take a screenshot (mobile)

!2high !2hot !airhorn !airplanes !anygirl !asskicker !attn

{
"workbench.colorTheme": "Material Theme Ocean High Contrast",
"workbench.colorCustomizations": {
"activityBarBadge.background": "#00BCD4",
"list.activeSelectionForeground": "#00BCD4",
"list.inactiveSelectionForeground": "#00BCD4",
"list.highlightForeground": "#00BCD4",
"scrollbarSlider.activeBackground": "#00BCD450",
"editorSuggestWidget.highlightForeground": "#00BCD4",
"textLink.foreground": "#00BCD4",