Skip to content

Instantly share code, notes, and snippets.

View CptSpaceToaster's full-sized avatar

CptSpaceToaster

View GitHub Profile
@font-face {
font-family: 'super_mario_script_2_demoRg';
src: url(data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAEiUABEAAAAAo1wAAEgrAAEZmQAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGh4GYACDUgg0CYRlEQgKgqNEgf4jATYCJAOGCAuDBgAEIAWFQAeEVQyCPD93ZWJmBhsIjjVy01m5HZAQNd/+UZRu2j6iKOOktWX//9cDJcf2495QihCICQPgGFUzSsawLGJtP1GOKsKDMGrmSPxyWCWlZ8u346/Mr/2GM8fUm+3V7rfVLaQkuyfx99gx3fYkdP+cQgr9032DhAwhAJk4sw6L85/mB/QGWR03L7otYU/LKeLqGYF/KXFcrXGcHLJRSCWj9ZCkqIUn+k7qVWOCWVAnYM2/kytZUx2d+SUMz+vm/0lIAtx7CYGQeyEJkFyQsBJZSsII44apkCArJCAzCRhEEpZoImMluhsctBjQYpXgoCM4a0HtVNva9hU60Ba0X/+r2GX76JJ4Yr+27wzzaE0bIXMNtyTaoDSmU5pXUuWXckkHnfsPpRogkBilP0OAUDUCNl6r18Y/XWvLcPv0b1me/2ljZRGxID988CxQii3uCWrTi9UwqWrkgZdy16pW5R3mzDQtj44BDAvltEf46uXjiQ8lu+VskUAaJZtCoES/o4L9P8xZOpItGBEZMHFgc4A5wra/Rxsc7zA8/MvPvdm48NrlA9Ad6AjrIsWEOfD/5S+z/+KMpHG5W4RDLH0tPRNWvqnLaeokved1G4PQlTvI20AZgUYHfo03wIFCmivtmFoGCiiBmEEpb3acMzhh+4u2uKL/otb929RmtNbT2xkpR0ZUiGhg4dkL33bIEGDVB1ReV1yK+spUx39vqtm+t0vo/q5EpbvsJDmkLvZKTqEoXbp0yf0f6e8uAG+itLsgOQAo+4Al7oRAnQFSZwiUq
@CptSpaceToaster
CptSpaceToaster / basic_pokmon_card_crawler.py
Last active March 30, 2022 18:12
Crawls the v2 pokemontcg.io API and prints card prices to console
import os
import requests # pip install requests
# Getting a POKEMONTCG_IO_API_KEY is optional.
# Read more about the API's use of keys here: https://docs.pokemontcg.io/getting-started/authentication
# https://able.bio/rhett/how-to-set-and-get-environment-variables-in-python--274rgt5
POKEMONTCG_IO_API_KEY = os.environ.get('POKEMONTCG_IO_API_KEY')
POKEMONIO_API_URL = 'https://api.pokemontcg.io'
import datetime
import pytest
from freezegun import freeze_time
@pytest.fixture()
def timeboat():
"""Grab the helm of the timeboat, we're going on an adventure!
Allows the test writer to freeze time so that time.time() returns a controlled value
https://stackoverflow.com/a/28073449/4717806"""
#!/usr/bin/env python3
import argparse
import sys
def digest(infile):
for line in infile.readlines():
mock(line)
@CptSpaceToaster
CptSpaceToaster / simple_tcgplayer.py
Last active December 10, 2020 16:34
A very simple demonstration of TCGPlayer's API.
import os
import requests # pip install requests
TCGPLAYER_API_URL = 'https://api.tcgplayer.com'
TCGPLAYER_API_VERSION = 'v1.39.0'
# https://able.bio/rhett/how-to-set-and-get-environment-variables-in-python--274rgt5
TCGPLAYER_PUBLIC_KEY = os.environ.get('TCGPLAYER_PUBLIC_KEY')
TCGPLAYER_PRIVATE_KEY = os.environ.get('TCGPLAYER_PRIVATE_KEY')
==> /etc/apt/sources.list.d/elementary.list <==
deb http://ppa.launchpad.net/elementary-os/stable/ubuntu trusty main
deb-src http://ppa.launchpad.net/elementary-os/stable/ubuntu trusty main
#!/usr/bin/env python3
import argparse
import sys
def digest(infile):
for line in infile.readlines():
mock(line)
PERIOD=300
AMPLITUDE=6000
O1=$((PERIOD/3))
O2=$((O1*2))
UUID=$(osascript -e "tell application \"iTerm2\"
get current session of current window
end tell" | cut -d' ' -f3 -f6 -f10)
set-background() {

ColoredLightsCore Lighting Formats


I confuse myself frequently here. I apologize if I made any incorrect statements in the past. Hopefully, I can write this clearly, and rely on this documentation for the future.

Bit Key:

L = Vanilla Blocklight (kept for backwards compatibility)
S = Vanilla Sunlight (How much sunlight is the block getting... or moonlight)
R = Red Light Channel (Added by CLC)
G = Green Light Channel (Added by CLC)
B = Blue Light Channel (Added by CLC)

#!/usr/bin/env python3
import argparse
import sys
def digest(infile):
for line in infile.readlines():
makeRegionalChars(line)