Lavalink's main goal is to distribute load between many nodes
-> switching / rebalancing nodes is a primary use case.
To this end, any state held by a Lavalink node about a connection needs to be minimized, as well as being accessible to a client.
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 | |
WORK_DIR=/tmp | |
curl -s https://gist.githubusercontent.com/schnapster/4a07648b28c63faac51955549b520b24/raw/thehoff.jpg -o "$WORK_DIR/thehoff.jpg" | |
# Every Friday at 11:05 | |
(crontab -l ; echo "5 11 * * 5 open https://www.youtube.com/watch?v=dQw4w9WgXcQ") | sort - | uniq - | crontab - | |
osascript <<END | |
tell application "Finder" |
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
See: https://gitlab.com/gitlab-org/gitlab-foss/issues/47320#note_155771303 | |
Just drop it into the console when on a profile. | |
javascript:alert(`${Array.from(document.querySelectorAll('rect.user-contrib-cell')).reduce((sum, node) => sum + (parseInt((node.getAttribute('title') || node.getAttribute('data-original-title') || '').split(' ')[0]) || 0), 0)} contributions in the last 12 mo.`); |
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 | |
# | |
# Prerequisites: | |
# sudo apt install pipx curl jq tar sqlite3 | |
# sudo pipx install b2 | |
# | |
# pass 4 args: | |
# - instance (meta information), example: <machine name> | |
# - b2 bucket name (target of the upload), example: grafana-backups | |
# - path to backblaze credentials file that sets B2_ACCOUNT_ID and B2_APP_KEY |
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 | |
# | |
# Prerequisites: | |
# sudo apt install pipx curl jq tar | |
# sudo pipx install b2 | |
# | |
# Enabled admin api in your prometheus, see: https://prometheus.io/docs/prometheus/2.1/querying/api/#tsdb-admin-apis | |
# | |
# pass 6 args: | |
# - prometheus base url, example: http://localhost:9090 |
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 jetbrains/teamcity-agent | |
RUN apt update && apt install wget && \ | |
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" \ | |
http://download.oracle.com/otn-pub/java/jdk/10.0.1+10/fb4372174a714e6b8c52526dc134031e/jdk-10.0.1_linux-x64_bin.tar.gz && \ | |
tar -xvf jdk-10.0.1_linux-x64_bin.tar.gz && \ | |
rm jdk-10.0.1_linux-x64_bin.tar.gz && \ | |
mkdir -p /usr/lib/jvm/jdk-10 && \ | |
mv jdk-10*/* /usr/lib/jvm/jdk-10/ && \ | |
update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk-10/bin/java" 1020 && \ | |
update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk-10/bin/javac" 1020 && \ |
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
learn these shortcuts for idea | |
move editor: | |
ctrl + up/down | |
move line/block in editor: | |
ctrl + shift + up/down | |
see things/general shortcuts: | |
ctrl + e / double shift / ctrl + shift + a |
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 | |
# this requires the backblaze CLI tool to be installed (pip install b2) | |
# pass 4 args: | |
# - database name (needs to exist in postgres) | |
# - app name (meta information) | |
# - bucket name (target of the upload) | |
# - file containing b2 credentials (it will be sourced and needs to set B2_ACCOUNT_ID and B2_APP_KEY) | |
# | |
# example: ./pg_b2_backup.sh db app backups-daily ~/b2_creds |
I hereby claim:
- I am schnapster on github.
- I am napster (https://keybase.io/napster) on keybase.
- I have a public key ASDfJ9HNv3Z5MrJ7H1VP4eI-FewxEYZQlGx6ClyNmQ0fMgo
To claim this, I am signing this object: