Skip to content

Instantly share code, notes, and snippets.

View turnipsoup's full-sized avatar
🍎

Jeremy Heckt turnipsoup

🍎
View GitHub Profile
@turnipsoup
turnipsoup / ps5-finder.py
Created June 23, 2021 14:41
Script we used to alert us if the PS5 was in stock. You need a Discord webhook.
import requests, logging
import pandas as pd
import bs4 as bs
logging.basicConfig(filename="./ps5search.log", level=logging.INFO, format="%(asctime)s|%(levelname)s|%(message)s")
# Define the base URL and the webhook URL
stock_url = "https://www.nowinstock.net/videogaming/consoles/sonyps5/"
webhook_url = "<Discord_Webhook_URL>"
@turnipsoup
turnipsoup / go-fn-v-scrape.go
Created June 11, 2021 04:01
Example of using goquery to fetch all `li` `href`s.
package main
import (
"fmt"
"log"
"net/http"
"github.com/PuerkitoBio/goquery"
)
@turnipsoup
turnipsoup / Player.gd
Created June 10, 2021 21:45
Example Godot-Script file for player movement for me to use for reference.
extends KinematicBody2D
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
const UP = Vector2(0,-1)
const GRAVITY = 20
const MAXFALLSPEED = 200
const MAXSPEED = 80
@turnipsoup
turnipsoup / init.vim
Last active May 3, 2021 14:16
My current basic `vim` or `nvim` config.
" Basics
syntax enable
set tabstop=4
set shiftwidth=4
set expandtab
set splitbelow
" Initiate Plugins
call plug#begin('~/.local/share/nvim/plugged')
@turnipsoup
turnipsoup / influxdb-grafana-deployment.yaml
Created March 4, 2021 04:56
For deploying influxdb and grafana together in kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
name: ifg-deployment
namespace: house-infra
labels:
app: ifg
spec:
replicas: 1
selector:
@turnipsoup
turnipsoup / transmission-deployment.yml
Last active May 12, 2024 16:40
Transmission, but in Kubernetes!
kind: Deployment
apiVersion: apps/v1
metadata:
name: transmission-deployment
namespace: house-infra
labels:
app: transmission
spec:
replicas: 1
selector:
@turnipsoup
turnipsoup / pihole-docker-compose.yaml
Last active February 12, 2021 19:47
Script for running and updating a Pihole docker container. You use the same script the first time you start it up as well.
version: "3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
@turnipsoup
turnipsoup / pihole.yaml
Last active January 19, 2021 05:42
Script and YAML file for stopping, updating, and restarting my docker Pihole installation
version: "3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
@turnipsoup
turnipsoup / us_and_wa_state_vote_ratio_2020.ipynb
Created November 16, 2020 03:24
Comparing just how blue/red states were in the 2020 Presidential election. Also has data for WA State by county. Storing here to save code for later.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@turnipsoup
turnipsoup / gameval.py
Last active January 10, 2021 19:40
Get current prices for games from pricecharting.com and return updated CSV
#!/usr/bin/env python3
# This script will read my games CSV list and update the current
# price of the games in the sheet
import pandas as pd
import requests
import bs4 as bs
from tabulate import tabulate