- MySQL/MariaDB doesn't have an armhf docker image by default, hence postgresql is used instead
- For some reason, the postgres env variables don't seem to work. If that's the case, use nextcloud for for DB and USER, and localhost:5432 for HOST
- I used Caddy for HTTPS encryption
NEXTCLOUD_DATA_DIR=/var/www/html/data
fixes a config write issue. The fix was found on this SO post!
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
yt-dlp {url} -S "height:720,+size" |
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
/** | |
* Import contacts with defined label, add them between colStart and colEnd, without adding ones that were previously added | |
*/ | |
function main() { | |
already_added = importContacts("Starred"); | |
importContacts("[0]", "F", "H", already_added); | |
} | |
function importContacts(groupname, colStart="A", colEnd="C", filter_out=[], maxMembers=50) { |
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
Archived! | |
This has been moved to a dedicated repo: https://github.com/denperidge/terraria-raspbian-server | |
------------------------------------------ | |
------------------------------------------ |
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
// Run the following two npm installs to get all the requirements set up | |
// npm install --global gulp-cli | |
// npm install --save-dev gulp gulp-pug node-sass gulp-sass gulp-autoprefixer gulp-babel @babel/core @babel/preset-env gulp-uglify browser-sync gulp-plumber | |
// You can configure the following variables to your liking | |
var sourceDir = 'src/'; | |
var destDir = 'docs/'; | |
var pugGlob = `${sourceDir}**.pug`; | |
var sassGlob = [`${sourceDir}**.scss`, `!${sourceDir}/**/vendor/**`]; | |
var jsGlob = [`${sourceDir}**/*.js`, `!${sourceDir}/**/vendor/**`]; |
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
<script> | |
function rng(min, max) { | |
// Inclusive rng function from W3Schools https://www.w3schools.com/js/js_random.asp | |
return Math.floor(Math.random() * (max - min + 1) ) + min; | |
} | |
var destructibleTextElements = | |
jQuery("span,p,h2,h4,h5,a,label") | |
.filter(function() { | |
// Visibility check through offsetparent from from https://stackoverflow.com/a/21696585 |
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 os import chdir, path, name | |
from subprocess import run | |
""" | |
If you're like me and postponed setting up ssh keys for way too long | |
and now you have a bunch of servers to do it with, here you go! | |
Credit where credit is due! | |
SSH setup tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys-2 |
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 | |
echo "Enter your download url that you made from here: https://caddyserver.com/download" | |
read downloadurl | |
curl --output caddy $downloadurl | |
chmod +x caddy | |
sudo mv caddy /usr/bin |
Links and instructions to do or fix specific problems!
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
# Add a keyframe every 1 frame (useful for working with video in Ableton - https://stackoverflow.com/a/33855249 | |
ffmpeg -i input.mp4 -c:v libx264 -x264opts keyint=1 output.mp4 | |
for filename in /mnt/sd/PRIVATE/AVCHD/BDMV/STREAM/*.MTS; do | |
echo $filename | |
ffmpeg -i "${filename}" -vcodec libx265 -acodec pcm_s16le "${currentdir}/$(basename ${filename}).mov" -report | |
done |