For the
nats-streaming-server
PR to allow for the addition and removal of nodes while the cluster is running,we prepared a small testing environment to verify it's behaviour.
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/sh | |
file2jsql(){ | |
# $1=file, $2=table_name | |
keyval=$(cat "${1}" | perl -n -e '/`db:"(.*)"\ / && printf(qq{"%s", %s,\n},$1,$1);') | |
keyval=${keyval%?} | |
echo "SELECT JSON_OBJECT(" | |
echo "$keyval" | |
echo ") FROM ${2};" | |
} |
I hereby claim:
- I am rwenz3l on github.
- I am rwenz3l (https://keybase.io/rwenz3l) on keybase.
- I have a public key ASA3-J6KLz8z8LFqC32iUxLegBr5QC8UIoFGlM94zUBEAwo
To claim this, I am signing this object:
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
yum update | |
cat > /etc/yum.repos.d/resilio-sync.repo <<'EOF' | |
[resilio-sync] | |
name=Resilio Sync $basearch | |
baseurl=http://linux-packages.resilio.com/resilio-sync/rpm/$basearch | |
enabled=1 | |
gpgcheck=1 | |
EOF |
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
# Snippets for fun and learning more about git (automation) | |
function abandon-git { | |
rescue_branch="Rescue-Branch-$(date +"%Y-%m-%d-%H-%M-%S")" | |
git checkout -b "${rescue_branch}" | |
git add --ignore-removal . | |
git commit -a -m 'This is a Rescue Commit - saves progress and pushes to new banch' | |
git push --set-upstream origin Rescue-Branch-2017-09-20-15-54-40 | |
} | |
function restore-git { |
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
sudo chown root:admin /Applications; sudo chmod 0775 /Applications | |
sudo chown root:wheel /Library; sudo chmod 0755 /Library | |
sudo chown root:admin /Library/Application\ Support; sudo chmod 0755 /Library/Application\ Support | |
sudo chown root:admin /Users; sudo chmod 0755 /Users | |
sudo chown root:wheel /usr; sudo chmod 0755 /usr | |
sudo chown root:wheel /usr; sudo chmod 0755 /usr/bin |
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 sys, os, re | |
import xml.etree.ElementTree as ET | |
from mutagen.mp3 import MP3 | |
''' | |
@param Uebergeben wird: "HostName" "/path/to/movies" "path/to/txt" | |
# HostName XServe = "XServe" | |
# Input XServe = "/Volumes/AUDIO" | |
# Output XServe = "/opt/syncthing/Repository/media" |
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
############################################# | |
### Proxmox V & Docker-CE + Portainer # | |
############################################# | |
## Rescue System | |
# Erase other disks | |
dd if=/dev/zero of=/dev/sda bs=1M count=100 | |
dd if=/dev/zero of=/dev/sdb bs=1M count=100 | |
# You can install debian 9 via the guide: |
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
# crc32 <(flac --decode --stdout --force-raw-format --endian=little --sign=signed /path/to/file.flac) | |
function veriflac() { | |
NC='\033[0m' | |
Red='\033[0;31m' | |
Green='\033[0;32m' | |
if [ $# -eq 0 ] | |
then | |
echo -e "${Red}Usage:" | |
echo -e " veriflac /path/to/folder${NC}"; |
NewerOlder