Skip to content

Instantly share code, notes, and snippets.

View tannerkrewson's full-sized avatar
💭
🚀🦀

Tanner Krewson tannerkrewson

💭
🚀🦀
View GitHub Profile
@tannerkrewson
tannerkrewson / prod.json
Created January 18, 2022 16:20
hud-28308
{
"device_identifier": "548978E6C4B6257E0DFFE734414D6B86:4d7c",
"deejay_device_id": 214,
"version": 1,
"all_cdn": true,
"content_eab_id": "EAB::25eb308c-5c6b-4db4-8842-5c3f7061a2e9::1136460852::161640008",
"region": "US",
"xlink_support": false,
"device_ad_id": "F735274B-162E-DA02-44F5-31267D571F5A",
"limit_ad_tracking": false,
@tannerkrewson
tannerkrewson / equinox.js
Created February 21, 2021 17:32
equinox price scraper
const https = require("https");
const getInfo = (i) =>
new Promise((resolve, reject) => {
https
.get("https://api.equinox.com/v6/acq/residential/plans/" + i, (resp) => {
let data = "";
resp.on("data", (chunk) => {
data += chunk;
});
@tannerkrewson
tannerkrewson / settings.json
Last active December 25, 2020 18:40
tanner windows terminal
// This file was initially generated by Windows Terminal 1.4.3243.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@tannerkrewson
tannerkrewson / gist:4c967814f940aa102cf5744a5cec7f8b
Last active January 11, 2020 05:37
kustom bedtime widget 2.0 w/global variables and auto hide
$if(gv(hours)<gv(maxcnt), "Bed time" + if(df(S)<=(si(alarmd)-gv(sleeptm)), " in") + if(gv(hours)>0, " "+gv(hours) + " hour" + if(gv(hours)!=1,"s") + " and") + " " + mu(round, (gv(mins)-(gv(hours)))*60, 0) + " minute" + if(mu(round, (gv(mins)-(gv(hours)))*60, 0)!=1, "s") + " " + if(df(S)>(si(alarmd)-gv(sleeptm)), "ago"))$
hours = $mu(round, mu(abs, df(S)-si(alarmd)+gv(sleeptm))/3600-.5, 0)$
mins = $(mu(abs, df(S)-si(alarmd)+gv(sleeptm))/3600)$
@tannerkrewson
tannerkrewson / gist:51f646eb4cdb661dd36b35131298ee12
Last active January 11, 2020 05:36
original kustom bedtime widget
Bed time$if(df(S)<=(si(alarmd)-gv(sleeptm)), " in")$$if(mu(round, mu(abs, df(S)-si(alarmd)+gv(sleeptm))/3600-.5, 0)>0, " "+mu(round, mu(abs, df(S)-si(alarmd)+gv(sleeptm))/3600-.5, 0) + " hour" + if(mu(round, mu(abs, df(S)-si(alarmd)+gv(sleeptm))/3600-.5, 0)!=1,"s") + " and")$ $mu(round, ((mu(abs, df(S)-si(alarmd)+gv(sleeptm))/3600)-(mu(round, mu(abs, df(S)-si(alarmd)+gv(sleeptm))/3600-.5, 0)))*60, 0)$ minute$if(mu(round, ((mu(abs, df(S)-si(alarmd)+gv(sleeptm))/3600)-(mu(round, mu(abs, df(S)-si(alarmd)+gv(sleeptm))/3600-.5, 0)))*60, 0)!=1, "s")$ $if(df(S)>(si(alarmd)-gv(sleeptm)), "ago")$
@tannerkrewson
tannerkrewson / help.js
Created April 8, 2018 18:18
banner class list filter
$('.datadisplaytable > tbody > tr').each(function() {
var first = $(this).children(":first").html();
if ($(this).children().length === 20 && first !== "Select" && first !== "&nbsp;") {
var days = $(this).children().eq(8).html().trim().length;
var hours = parseInt($(this).children().eq(6).html());
if (days !== 1 || hours < 3) {
$(this).detach();
}
} else {
$(this).detach();
@tannerkrewson
tannerkrewson / userscript.js
Created December 18, 2017 20:32
Hulu Auto Pause After Ad
// ==UserScript==
// @name Hulu Auto Pause After Ad
// @author Tanner Krewson
// @match https://www.hulu.com/*
// ==/UserScript==
(function() {
'use strict';
var time;
var wasAdDisplayedBefore = false;
var checker = setInterval(function() {
@tannerkrewson
tannerkrewson / rational_runner.cc
Last active December 12, 2017 02:52
rational class runner/tester
#include <iostream>
#include "rational.h"
using namespace std;
int main() {
Rational a( -1, 2 ), b( 250, 500 ), c(-123, -456), d(456,123), e(28, 7), f(369,123);
Rational out1 = b+a+c*d+f*e+b/a-c;
cout << "1783/152 should be printed => " << out1 << endl;