Skip to content

Instantly share code, notes, and snippets.

View lstellway's full-sized avatar

Logan Stellway lstellway

View GitHub Profile
@lstellway
lstellway / download-video.js
Last active August 15, 2026 18:06
download-video.js
javascript:(function(c){var/**/s=document.createElement("script");s.src=URL.createObjectURL(new/**/Blob([c],{type:"text/javascript"}));document.head.appendChild(s)})(String.fromCharCode(34,117,115,101,32,115,116,114,105,99,116,34,59,40,40,41,61,62,123,118,97,114,32,103,61,34,95,95,118,105,100,101,111,95,103,114,97,98,98,101,114,95,112,97,110,101,108,95,95,34,44,120,61,47,92,46,109,51,117,56,40,92,63,124,36,41,47,105,44,121,61,47,92,46,40,109,112,52,124,119,101,98,109,124,109,111,118,124,109,52,118,124,111,103,118,124,111,103,103,41,40,92,63,124,36,41,47,105,44,67,61,96,10,58,104,111,115,116,32,123,10,32,32,97,108,108,58,32,105,110,105,116,105,97,108,59,10,32,32,100,105,115,112,108,97,121,58,32,98,108,111,99,107,59,10,32,32,112,111,115,105,116,105,111,110,58,32,102,105,120,101,100,59,10,32,32,116,111,112,58,32,49,54,112,120,59,10,32,32,114,105,103,104,116,58,32,49,54,112,120,59,10,32,32,122,45,105,110,100,101,120,58,32,50,49,52,55,52,56,51,54,52,55,59,10,32,32,99,111,108,111,114,45,115,99,104,101,109,101,58,32


⚠️ I have since created lstellway/synology-dev-env to provide a local development environment for Synology via containers. There is an included example for building vim.
 

Compile VIM for Synology NAS

Let me start by saying: this is not a happy story..
This process was a bit painful, and I definitely stumbled through it.
Would love to hear if I missed anything or if anybody has ideas.

Synology provides a package developer guide. I primariliy referenced the prepare environment and your first package sections.

@lstellway
lstellway / vin-data.json
Created January 18, 2023 04:08
Example VIN response
{
"Count": 136,
"Message": "Results returned successfully. NOTE: Any missing decoded values should be interpreted as NHTSA does not have data on the specific variable. Missing value should NOT be interpreted as an indication that a feature or technology is unavailable for a vehicle.",
"SearchCriteria": "VIN(s): WVWWF7AUXHW160687",
"Results": [
{
"ABS": "Standard",
"ActiveSafetySysNote": "Park Distance Control (Park Pilot): Standard",
"AdaptiveCruiseControl": "Standard",
"AdaptiveDrivingBeam": "Standard",
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td
style="
border-right: 3px solid #586b59;
vertical-align: middle;
padding: 0;
"
vertical-align="middle"
@lstellway
lstellway / timer.sh
Last active March 2, 2022 23:41
Shell-based timer for `bash` and `zsh`
# Read a message using the OSX `say` command
#
# In my opinion, the best voices for American English seem to be:
# 'Daniel', 'Karen', 'Rishi', 'Tessa'
export TIMER_COMMAND="say -v Karen --interactive=bold '%s'"
# Hide tty input while command is running
_timer_tty_off() {
[ -t 0 ] && stty -echo -icanon time 0 min 0
}
@lstellway
lstellway / update-mysql-letsencrypt
Created February 23, 2022 02:35
Helper script to update MySQL / MariaDB TLS after renewing LetsEncrypt certificate
#!/bin/bash
DOMAIN="$1"
SOURCE="/etc/letsencrypt/live/${DOMAIN}"
DESTINATION="/var/lib/mysql/pki"
USER="mysql."
# Validate provided domain
if [ -z "${DOMAIN}" ] || [ ! -d "${SOURCE}" ]; then
printf "Please enter a valid domain (provided '%s')\n" "${DOMAIN}"
@lstellway
lstellway / macos-change-ssh-port.sh
Last active June 10, 2023 21:49
Change the default SSH port on macOS
# Setup SSH port
SYSTEM_SSH_PLIST="/System/Library/LaunchDaemons/ssh.plist"
ssh_set_port() {
# Ensure a port is specified
if [ -z "$1" ]; then
printf "No port specified...\n"
return 1
fi
@lstellway
lstellway / operator.yml
Created February 4, 2022 21:17
PlanetScale.com - Vitess Operator for Kubernetes `v1.21.1`
# Version: 20200918: 25ca1bc881f433d2a42c3b5f59da416f4ef6dc44
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
creationTimestamp: null
name: etcdlockservers.planetscale.com
spec:
group: planetscale.com
@lstellway
lstellway / synology-dsm-getcert.sh
Last active February 23, 2022 02:45
Shell utility to help find the certificates used by a specified FQDN on Synology NAS
#!/bin/sh
# Help
if [ "$1" == "-h" -o "$1" == "--help" ]; then
SCRIPT="$(basename ${0})"
cat <<EOF
${SCRIPT}
Shell utility to help find the certificates used by a specified FQDN on Synology NAS
Usage
@lstellway
lstellway / NGINX Config - IP Address JSON
Created January 15, 2021 21:19
Simple NGINX config to return real client IP address
map ":$http_x_forwarded_for" $IP_ADDR {
":" $remote_addr; # Forwarded for not set
default $http_x_forwarded_for; # Forwarded for is set
}
server {
server_name example.com;
listen 80;
listen [::]:80;