This file contains hidden or 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 | |
ip='192.168.0.3' | |
# START | |
curl "http://$ip/YamahaRemoteControl/ctrl" -H "Origin: http://$ip" -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: fr,en-US;q=0.8,en;q=0.6' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.93 Safari/537.36' -H 'Content-Type: text/xml' -H 'Accept: */*' -H "Referer: http://$ip/" -H 'Connection: keep-alive' --data-binary '<YAMAHA_AV cmd="PUT"><Main_Zone><Input><Input_Sel>AUDIO2</Input_Sel></Input></Main_Zone></YAMAHA_AV>' --compressed | |
# STOP | |
curl "http://$ip/YamahaRemoteControl/ctrl" -H "Origin: http://$ip" -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: fr,en-US;q=0.8,en;q=0.6' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.93 Safari/537.36' -H 'Content-Type: text/xml' -H 'Accept: */*' -H "Referer: http://$ip/" -H 'Connection: keep-alive' --data-binary '<YAMAHA_AV cmd="PUT"><Main_Zone><Input><Input_Sel>AV1</Input_Sel></Input></Main_Zone></YAMAH |
This file contains hidden or 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
set -e | |
SITE="domain.com" | |
DEPL="/home/forge/deployments/${SITE}" | |
# create directory and any intermediate directories if don't exist | |
mkdir -p ${DEPL} | |
CUR="/home/forge/${SITE}" | |
NEW="${DEPL}/new" |
This file contains hidden or 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 | |
# Get Plex Latest Package URL | |
packageUrl=$(curl -s 'https://plex.tv/api/downloads/1.json' | jq -r '.computer.Linux.releases[0].url') | |
echo "Latest Package Url: $packageUrl" | |
# Get the filename | |
fileName=$(basename $packageUrl) | |
echo "Filename: $fileName" |
This file contains hidden or 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
# Directories | |
alias ..="cd .." | |
alias ....="cd ../.." | |
alias nginx="cd /etc/nginx/sites-available" | |
alias aliasedit="nano ~/.bashrc" | |
alias aliasreload=". ~/.bashrc" | |
alias ll="ls -la" | |
alias cdw="cd /var/www/html" | |
alias size="du -sh" |
This file contains hidden or 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
# Directories | |
alias ..="cd .." | |
alias ....="cd ../.." | |
alias cdw="cd /c/Users/clr/projects" | |
alias ls='ls -l --color' | |
# Terminal | |
alias c="clear" | |
alias aliasedit="code ~/.bashrc" | |
alias aliasreload=". ~/.bashrc" |
This file contains hidden or 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
find . -name "*.mp3" -type f -printf "%f\n" | | |
while read filename | |
do | |
music=${filename%.mp3} | |
artist=${filename% -*} | |
if [ -d "$artist" ]; then | |
mv "$filename" "$artist" | |
else | |
mkdir -pv "$artist" | |
mv "$filename" "$artist" |