Skip to content

Instantly share code, notes, and snippets.

View index.html
<!DOCTYPE html>
<html>
<head>
<title>Demo Page</title>
<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
<body>
<h1>Hello world!</h1>
<h2>About this site</h2>
View main.css
* {
font-family:'Helvetica', 'Arial', 'Sans-Serif';
}
body {
margin: 60px auto;
width: 70%;
}
a {
font-weight: bold;
text-decoration: none;
View Hide columns in a spreadsheet
// Adds the custom menu to the active spreadsheet.
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.createMenu('Views')
.addItem('Show All', 'showAll')
.addItem('Contact Information View', 'contactInfoView')
.addItem('Calendar View', 'calendarView')
.addItem('Paperwork View', 'paperworkView')
.addItem('Tasks View', 'tasksView')
.addToUi();
View stabilize.sh
#!/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
View start goxlr minimized.ahk
#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
View .tmux.conf
# 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
@TaylorJadin
TaylorJadin / port-forward.sh
Last active Mar 8, 2021
LXD simple port forwarding
View port-forward.sh
#!/bin/bash
if [ $# -ne 3 ]
then
echo "Usage: ./port-forward.sh [container] [tcp|udp] [port number]"
exit
fi
container="${1}"
protocol="${2}"
@TaylorJadin
TaylorJadin / valhook.py
Last active Mar 30, 2021
Check the player count of a valheim server, then notify on discord if there is a change. This script is designed to run every minute or so in cron. It uses the gamedig cli to get the player count, so this script could work for all sorts of other games with a little modification.
View valhook.py
import subprocess
import json
import os.path
import requests
# This script requires gamedig to be installed: https://github.com/gamedig/node-gamedig#usage-from-command-line
### config ###
webhook_url = "https://discord.com/api/webhooks/..."
gamedig_cmd = "gamedig --type valheim server.address:2457"
@TaylorJadin
TaylorJadin / backup.sh
Last active Apr 16, 2021
piboy pi backup
View backup.sh
#!/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