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
package main | |
import ( | |
"database/sql" | |
"fmt" | |
"io" | |
"log" | |
"os" | |
"strings" | |
"time" |
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
param ( | |
[string]$inputFile, | |
[string]$outputFile | |
) | |
if (-not (Test-Path $inputFile)) { | |
Write-Host "Input file '$inputFile' not found." | |
Exit 1 | |
} |
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
{ config, pkgs, lib, ... }: | |
let | |
user = "guest"; | |
password = "guest"; | |
SSID = "mywifi"; | |
SSIDpassword = "mypassword"; | |
interface = "wlan0"; | |
hostname = "myhostname"; | |
nixosHardwareVersion = "1bc731fde4af337134331572889de8dd8dbff897"; |
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
+ HAS_PRO_INSTALLED=0 | |
++ dirname bash | |
+ SCRIPT_DIR=. | |
+ [[ . = \. ]] | |
+ SCRIPT_DIR=/opt/tinypilot | |
+ readonly SCRIPT_DIR | |
+ readonly TINYPILOT_README=/opt/tinypilot/README.md | |
+ TINYPILOT_README=/opt/tinypilot/README.md | |
+ [[ -f /opt/tinypilot/README.md ]] | |
+ readonly HAS_PRO_INSTALLED |
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
# your personal machine running jacktrip | |
REMOTE_JACK_SERVER=nat.local | |
# change to any name to identify this jacktrip client | |
JOB_NAME=J1 | |
BUFFER_SIZE=1024 | |
# -d hw:1,0 for pikvm v3 hat | |
# -d hw:0,0 for others | |
AUDIO_DEVICE=-d hw:1,0 | |
pacman -Sy |
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 | |
set -eu | |
JOURNAL="myjournal.beancount" # Replace with your beancount file | |
RESULT="$(bean-query "${JOURNAL}" \ | |
'SELECT account, sum(position) | |
WHERE account = "Assets:Transfers";')" | |
TRANSFERS_LINE="$(echo "${RESULT}" | grep "^Assets:Transfers")" |
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 --privileged --network host --publish 8001:8001 --publish 8002:8002 --name janus-ustreamer janus-ustreamer:latest | |
WARNING: Published ports are discarded when using host network mode | |
-- INFO [164530.467 main] -- Using internal blank placeholder | |
-- INFO [164530.467 main] -- Using H264-sink: h264_memsink | |
-- INFO [164530.470 main] -- Listening HTTP on [127.0.0.1]:8001 | |
-- INFO [164530.470 stream] -- Using V4L2 device: /dev/video0 | |
-- INFO [164530.470 stream] -- Using desired FPS: 30 | |
-- INFO [164530.470 http] -- Starting HTTP eventloop ... | |
-- INFO [164530.470 stream] -- H264: Initializing MMAL encoder ... | |
-- INFO [164530.470 stream] -- H264: Using bitrate: 5000 Kbps |
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
# Instructions for resizing the LVM volume on a VM | |
DISK=/dev/sda | |
VOLUME="${DISK}3" | |
sudo fdisk "${DISK} | |
# Press d, accept defaults | |
# Press n, accept defaults | |
# Press w, accept defaults |
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
function git_sync_and_branch { | |
local readonly TARGET_BRANCH="$1" | |
git checkout master && \ | |
git pull origin master | |
if [[ ! -z "$TARGET_BRANCH" ]]; then | |
git checkout -b "${TARGET_BRANCH}" | |
fi | |
} |
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 | |
# Set TinyPilot to jiggle the mouse every 3 seconds. | |
# Author: Michael Lynch | |
# https://tinypilotkvm.com | |
# License: MIT License | |
set -e | |
set -u |
NewerOlder