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
# .bashrc - Aliases | |
# Custom shell prompt | |
export PS1="\[\033[38;5;11m\]\u\[$(tput sgr0)\]@\h\[$(tput sgr0)\]\[\033[38;5;6m\][\[$(tput sgr0)\]\[\033[38;5;39m\]\W\[$(tput sgr0)\]\[\033[38;5;6m\]]\[$(tput sgr0)\]\\$ \[$(tput sgr0)\]" | |
# Work with sudo | |
alias sudo='sudo ' | |
# User specific aliases and functions | |
# Modem Restart | |
alias modemr="nohup /opt/cron/modem/restart.sh > /dev/null 2>&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
#!/usr/bin/env bash | |
# ------ | |
# Creates a daemon user in linux | |
# usage: create-daemon-usr.sh <username> | |
# ------ | |
# Add user | |
/usr/sbin/useradd -r $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
#username | |
#rpc-user= | |
#Password | |
#rpc-passwd=111111 | |
#The above authentication method is not recommended, it is recommended to use the following token method | |
#Set the encryption key | |
rpc-secret= |
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
# Access Pihole UI on http[s]://web.tld/pihole | |
# Add ^~ to disable php execution, since lighttpd has already executed the | |
# php scripts, no need to execute the output of php files from lighttpd | |
location ^~ /pihole/ { | |
proxy_pass http://localhost:6775/admin/; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_read_timeout 90; |
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
lxc-create --name ubuntu-jammy --template download -- --dist ubuntu --release jammy --arch amd64 | |
lxc-start -n ubuntu-jammy # start | |
lxc-stop -n ubuntu-jammy # stop | |
lxc-ls -f # list | |
lxc-attach -n ubuntu-jammy | |
# usermods | |
adduser vince | |
apt install -y sudo | |
addgroup vince sudo |
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
# In Ubuntu 20.04 Focal Fossa, there's a simple setting you can configure in Appearance -> Dock -> Show on: | |
# Dock tweaks (Doesn't work with Dock to Panel) | |
# minimize on click | |
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize' | |
# show icons that are open on that screen | |
gsettings set org.gnome.shell.extensions.dash-to-dock isolate-monitors true |
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
# List users | |
SELECT * FROM pg_catalog.pg_user; | |
# Create user | |
CREATE USER youruser WITH ENCRYPTED PASSWORD 'yourpass'; | |
# Create db owned by user | |
CREATE DATABASE "sonarr-main" OWNER sonarr; | |
CREATE DATABASE "sonarr-log" OWNER sonarr; |
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
# Change title and audio track languaage | |
mkvpropedit --edit info --set "title=The movie" --edit track:a1 --set language=tl input.mkv | |
# Rename track title | |
mkvpropedit *.mkv -e track:a1 -s name="Surround" | |
# Add encoding settings | |
for i in *.mkv; do mkvpropedit "$i" --tags track:v1:tags.xml; done | |
# Copy from public to uploads folder | |
for i in *.mkv; do mkdir "/data/torrents/uploads/${i%.*}"; done |
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
# MD5 sum of a folder | |
find folder/ -type f -print0 | xargs -0 md5sum | md5sum |
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
/*! | |
* A simple flat theme with dark colours | |
* By aab12345 (modified by vincejv) | |
* | |
* License: MIT | |
* Compatible with The Lounge 4.2.0 / 4.3.0 / 4.4.0 | |
* Last Updated: 01/20/2024 | |
* Preview: https://i.imgur.com/8UgEkNL.png | |
*/ |
OlderNewer