Skip to content

Instantly share code, notes, and snippets.

View derekslenk's full-sized avatar

Derek Slenk derekslenk

View GitHub Profile
@derekslenk
derekslenk / pihole.yml
Last active May 9, 2019 00:09
For setting up pihole and cloudflared for DNS over HTTPs
version: '2'
# More info for pihole: https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
# More info for cloudflared: https://hub.docker.com/r/visibilityspots/cloudflared/ and https://docs.pi-hole.net/guides/dns-over-https/
services:
cloudflared:
container_name: "cloudflared"
image: visibilityspots/cloudflared:amd64
network_mode: "host"

Keybase proof

I hereby claim:

  • I am derekslenk on github.
  • I am slenk (https://keybase.io/slenk) on keybase.
  • I have a public key ASATHMnbNbiXdiEn8xLAYSF4DZNkJfHR1o3XdEJj_YOWMwo

To claim this, I am signing this object:

@derekslenk
derekslenk / Commands.sh
Last active March 30, 2020 04:51 — forked from nrollr/Commands.sh
Install PHP 7.3 and NGINX on Amazon Linux 2 AMI
## Install NGINX
$ sudo amazon-linux-extras install nginx1.12 -y
## Install PHP and PHP-FPM
# this package include php-fpm
$ sudo amazon-linux-extras install php7.3 -y
## Configure NGINX (see below)
$ sudo nano /etc/nginx/conf.d/default.conf
@derekslenk
derekslenk / start.gcode
Last active July 3, 2024 21:17
Cura Custom Start G-Code Ender 3 / BLTouch / SKR Mini E3 v2
; Ender 3 Custom Start G-code
; Script based on an original created by tjjfvi (https://github.com/tjjfvi)
; An up-to-date version of the tjjfvi's original script can be found
; here: https://csi.t6.fyi/
; Note - This script will only work in Cura V4.2 and above!
; --- Global Settings
; layer_height = {layer_height}
; smooth_spiralized_contours = {smooth_spiralized_contours}
; magic_mesh_surface_mode = {magic_mesh_surface_mode}
@derekslenk
derekslenk / dirlisticle.py
Created July 14, 2023 20:53
I had a folder of printing models that all had images, but were all in individual subfolders and named funny. This pulls out the name of all the image files in a list so you can browse/do with as you please
import sys
import re
from pathlib import Path
# Copyright (c) 2023 Derek Slenk. All rights reserved.
INVALID_FILENAME_PATTERN = re.compile(r"\d+[\w]+\.\w+")
ALLOWED_CHARS_PATTERN = re.compile(r"[^\d_-]")