Skip to content

Instantly share code, notes, and snippets.

View TaylorJadin's full-sized avatar

Taylor Jadin TaylorJadin

View GitHub Profile
@TaylorJadin
TaylorJadin / docker-compose.yml
Last active July 12, 2022 05:42
docker compose for nextcloud
version: '3.3'
services:
app:
image: nextcloud
restart: always
ports:
- '8080:80'
volumes:
- 'nextcloud:/var/www/html'
volumes:
@TaylorJadin
TaylorJadin / docker-compose.yml
Created July 5, 2022 13:31
starter docker-compose
version: '3.3'
services:
SERVICE_NAME:
image: DOCKERHUB_IMAGE
restart: always
ports:
- 'HOST_PORT:CONTAINER_PORT'
volumes:
- 'VOLUME_NAME_OR_PATH:PATH_INSIDE_CONTAINER'
environment:
set appName to "Stream Deck"
set usbDeviceName to "Stream Deck"
set usbData to do shell script "system_profiler SPUSBDataType -detailLevel basic"
if usbData contains usbDeviceName then
log "Stream Deck connected"
if application appName is running then
log "Stream Deck.app is already running"
else
log "Launching Stream Deck.app"
@TaylorJadin
TaylorJadin / backup.sh
Last active December 18, 2023 04:52
backup script
#!/bin/bash
TARGET="/root/foundry"
DESTINATION="/root/backups"
BACKUPS_TO_KEEP=20
NOW=`date -u +"%Y-%m-%dT%H:%M:%SZ"`
slow() {
start=`date +%s`
tar -cvJf "$DESTINATION/$NOW.tar.xz" $TARGET
@TaylorJadin
TaylorJadin / create-local-users.ps1
Created May 25, 2021 03:15
Create local users in bulk from a csv using powershell
$importCSVpath="C:\users\paperspace\desktop\userlist.csv"
ForEach ($user in (Import-CSV $importCSVpath)){
$password = ConvertTo-SecureString $user.password -AsPlainText -Force
New-LocalUser -Name $user.username -Password $password -FullName $user.fullname
}
##.adblock-allowlist-messaging__wrapper
@TaylorJadin
TaylorJadin / backup.sh
Last active April 16, 2021 14:23
piboy pi backup
#!/bin/bash
output=$1
sd="/dev/mmcblk0"
if [ -z "$output" ]
then
echo "No output path specified."
echo "Example: backup.sh /media/usb1/piboy.img.gz"
exit
@TaylorJadin
TaylorJadin / port-forward.sh
Last active March 8, 2021 00:55
LXD simple port forwarding
#!/bin/bash
if [ $# -ne 3 ]
then
echo "Usage: ./port-forward.sh [container] [tcp|udp] [port number]"
exit
fi
container="${1}"
protocol="${2}"
# Use zsh
set-option -g default-shell /usr/bin/zsh
# remap prefix from 'C-b' to 'C-z'
unbind C-b
set-option -g prefix C-z
bind-key C-z send-prefix
# split panes using \ and -
bind \\ split-window -h
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Run, "C:\Program Files (x86)\TC-Helicon\GOXLR\GoXLR App.exe"
WinWait, GOXLR App
While WinExist(GOXLR App)
{
Sleep 100