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 | |
set -eu | |
ME="${0##*/}" | |
PWDROM="/home/ruben/Juegos/dosbox/rom" | |
EXTROM=".tar.zst" | |
INFO="Dosbox Package Manager\nUse: $ME <action> [<rom_package>|<directory>]\nAvailable actions:\n launch <romfile>: Launch a rom package in dosbox\n list: List roms\n pack <directory>: Compress a game into a rom package\n unpack <romfile>: Decompresses a rom package into a directory\nLibrary location: \"$PWDROM\"\n" | |
if [ "$#" -lt 1 ]; then | |
echo -e "$INFO" |
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 | |
# Pulseaudio sink switcher | |
# Required commands: notify-send, zenity | |
SINK_LIST=$(pacmd list-sinks | grep -E "(index:|device.description)" | xargs -n2 -d'\n') | |
COUNT=$(echo "$SINK_LIST" | wc -l) | |
NEW_SINK="" | |
if [ $COUNT -eq 0 ]; then | |
notify-send "No audio sinks available" | |
elif [ $COUNT -eq 1 ]; then | |
notify-send "There's just one audio sink available" |
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
mysql3rdpartytunnel() { | |
SSH_HOST="<SSH HOST USE .SSH/CONFIG>" | |
MYSQL_HOST="<THIRD PARTY MYSQL SERVER>" | |
MYSQL_USER="<MYSQL SERVER USER>" | |
MYSQL_PASSWORD="<MYSQL PASSWORD>" | |
MYSQL_DEFAULT_SCHEMA="" | |
LOCALPORT=33061 | |
SOCKET="/tmp/ssh-tunnel-$SSH_HOST-$RANDOM" | |
echo "Opening SSH socket $SOCKET..." |
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 | |
# pkt - Package-management Kommon inTerface - 2009-2010 (c) Ruben "Khroma" Gomez | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
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 | |
# Nvidia official linux drivers and the bbswitch module are asumed to be installed, when using the integrated | |
# intel video card bbswitch will be used to turn the Nvidia card off for energy saving purposes. Reboot is needed to | |
# switch between modes. | |
# NOTE: | |
# /etc/lightdm.conf must contain this text, uncommented: | |
# | |
# [Seat:*] | |
# ... etc ... |
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 | |
ROOT=/var/www/ | |
SHOW_LAST_COMMITS=2 | |
TOP_LEVEL="" | |
READ_PRE=">" | |
ECHO_PRE=" " | |