Skip to content

Instantly share code, notes, and snippets.

View turnipsoup's full-sized avatar
🍎
Getting healthier

Jeremy Heckt turnipsoup

🍎
Getting healthier
View GitHub Profile
@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 / 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 / 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 / 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 / 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 / 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 / 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 / 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 / ip_check.py
Created August 3, 2021 01:00
Checks your current IP against the last one, and alerts you in Discord if it changes.
import requests
import os.path
ip_address_file = "./last_ip_address.txt"
discord_webhook_url = "<webhook-url-goes-here>"
# Get current IP address from icanhazip
def get_current_ip() -> str:
r = requests.get("https://icanhazip.com")
return r.content.decode().strip()
@turnipsoup
turnipsoup / red_pixels.go
Created August 16, 2021 01:18
Just learning Ebiten - will slowly fill every pixel in the window starting from the top left.
package main
import (
"image/color"
"log"
"github.com/hajimehoshi/ebiten/v2"
)
// Game implements ebiten.Game interface.