Skip to content

Instantly share code, notes, and snippets.

View TaylorJadin's full-sized avatar

Taylor Jadin TaylorJadin

View GitHub Profile
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 / 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:
@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 / gtmetrix
Last active August 30, 2022 18:16
Submit multiple URLS to gtmetrix using their API
#!/bin/bash
# Config
GTMETRIX_API_KEY=
SLEEP_TIME=5
# Functions
function submit_test {
curl -s -u $GTMETRIX_API_KEY: \
-X POST -H Content-Type:application/vnd.api+json \
@TaylorJadin
TaylorJadin / plugin.php
Created October 21, 2022 16:48
WordPress Plugin starter
<?php
/**
* Plugin Name: My neato plugin
* Plugin URI: https://github.com/TaylorJadin/tiny-wordpress-plugins
* Description: This plugin does things, probably.
* Version: 1.0
* Author: Taylor Jadin
* Author URI: https://jadin.me/
**/
@TaylorJadin
TaylorJadin / checkboxes.html
Last active January 10, 2023 16:20
checboxes with saved states
<div class="checkbox-list">
<p>
<input type="checkbox" class="save-cb-state" name="unique-name-1" value="no">
</p>
</div>
<script src="https://code.jquery.com/jquery.js"></script>
<script>
// Avoid scoping issues by encapsulating code inside anonymous function
#!/bin/bash
#
# Uses ffmpeg to stabilize video. Give the script one or more files and it will do its thing.
#
# Needs an ffmpeg binary compiled with support for vidstab, you can find that at the site if this script doesn't work:
# https://www.johnvansickle.com/ffmpeg/
#
# More info / based on:
# https://www.imakewebsites.ca/posts/2018/02/17/stabilizing-gopro-video-with-ffmpeg-and-vid.stab/
# https://rainnic.altervista.org/en/how-stabilize-video-using-ffmpeg-and-vidstab?language_content_entity=en
@TaylorJadin
TaylorJadin / open-close-obs.applescript
Created July 12, 2023 16:27
Open (or Close) OBS and hide the window
set appname to "OBS"
if application appName is running then
log appName & " is already running"
do shell script "killall OBS"
else
do shell script "open -a /Applications/OBS.app --args --startvirtualcam"
delay 3
tell application "System Events"
repeat until visible of process appname is false
set visible of process appname to false
@TaylorJadin
TaylorJadin / composer.json
Created September 26, 2023 20:24
basic pressbooks composer.json
{
"require": {
"pressbooks/pressbooks": "*",
"pressbooks/pressbooks-aldine": "*",
"pressbooks/pressbooks-book": "*",
"pressbooks/pressbooks-clarke": "*",
"pressbooks/pressbooks-donham": "*",
"pressbooks/pressbooks-jacobs": "*"
},
"config": {
@TaylorJadin
TaylorJadin / isitwp.sh
Last active October 4, 2023 19:15
isitwp?
#!/bin/bash
# Colors
INVALID='\033[0;31m'
WP='\033[0;34m'
NOWP='\033[0;33m'
NC='\033[0m'
for URL in "$@"
do