View rebroadcast.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# You can use streamlink to extract the stream URL, e.g.: | |
# PL_URL=$(streamlink --stream-url https://livestream-website-url best) | |
# Generally figured out from this gist... | |
# https://gist.github.com/keiya/c8a5cbd4fe2594ddbb3390d9cf7dcac9 | |
PL_URL=https://some.owncast-server.tv/hls/1/stream.m3u8 | |
while ! curl -s $PL_URL | grep -q offline; do |
View global-video-shortcuts-userscript.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Global Video Shortcuts | |
// @namespace Violentmonkey Scripts | |
// @match *://*/* | |
// @grant none | |
// @version 1.0 | |
// @author - | |
// @description lets you step through videos on any site using youtube's keyboard shortcut design | |
// ==/UserScript== |
View gist:2022a0aba0f61708ff72df20a18dfd72
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --name timescaledb -t timescale/timescaledb:latest-pg12 -e POSTGRES_USER=user -e POSTGRES_PASSWORD=pass -e POSTGRES_DB=db -p 5432:5432 | |
docker run --name grafana -t grafana/grafana:7.5.6 -p 3000:3000 | |
now you can visit port 3000 and add a datasource using the credentials |
View Youtube Shorts Scrubber Bar.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Youtube Shorts Scrubber Bar - Adds back the scrubber bar for youtube shorts | |
// @namespace Violentmonkey Scripts | |
// @match https://www.youtube.com/shorts/* | |
// @grant none | |
// @version 1.0 | |
// @author - | |
// @require https://code.jquery.com/jquery-3.6.0.js | |
// @description 10/27/2021, 8:04:38 PM | |
// ==/UserScript== |
View Dark Wikipedia.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Dark Wikipedia | |
// @description Darkens Wikipedia on iOS & macOS Safari, for use with https://github.com/quoid/userscripts | |
// @match https://en.m.wikipedia.org/* | |
// @match https://en.wikipedia.org/* | |
// @updateURL | |
// @version 1.3 | |
// ==/UserScript== | |
function darkenChrome() { |
View Vagrantfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
View Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:20.04 | |
ENV TZ=America/Los_Angeles | |
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | |
RUN useradd -s /usr/bin/bash -d /home/deployer -m deployer | |
RUN mkdir /app | |
RUN chown deployer /app | |
RUN apt-get update && apt-get install -y \ |
View new desktop shortcut.lnk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"C:\Program Files\Git\usr\bin\mintty.exe" -w full -h always /bin/bash -l -e -c 'ssh -t pi@192.168.88.114 tmux new-session -A -s main' |
View 1pass_dups.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// you need `op` tool for this, download it here https://support.1password.com/command-line/ | |
// create items.json like so: | |
// op list items | jq > items.json | |
// then run this script | |
// this script outputs uuids of dupes as keyed by item title, create, and modified date, | |
// feed it into the delete command like so: | |
// node process.js | xargs -I{} op delete item {} | |
const items = require('./items.json'); |
View nvidia.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { exec } = require('child_process'); | |
const getGPUList = async () => { | |
return new Promise(function(resolve, reject) { | |
exec('nvidia-smi -L', (err, stdout, stderr) => { | |
if (err) return reject(err); | |
let gpuMap = stdout.trim().split('\n').reduce((acc, line)=>{ | |
let [_, numStr, uuid] = line.match(/GPU (\d+):.+UUID: (.+)\)/) | |
return {...acc, [uuid]: numStr} | |
}, {}); |
NewerOlder