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 | |
# wget percona.com/get/percona-toolkit.deb | |
declare -r \ | |
_BACKUP_DIR="/root/backup/" \ | |
_OCCURRENCES=24 | |
# Get the real number of backup occurrences and delete the old ones | |
function delete () { |
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 | |
# starting timdity | |
timidity -iA -B2,8 -Os -EFreverb=0 & | |
# get timidity's PID | |
_PID="$!" | |
# start GP5 | |
/usr/share/playonlinux/playonlinux --run "GP5" |
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
own_window yes | |
own_window_transparent yes | |
own_window_type desktop | |
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager | |
own_window_argb_visual yes | |
own_window_argb_value 100 | |
out_to_console no | |
use_xft yes | |
xftfont cure:size=10 | |
update_interval 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
#!/bin/bash | |
# Switch screen && sound && color temperature using xrandr/pactl/redshift | |
## CONFIGURATION | |
_USB_SINK="$( pactl list short sinks | grep 'usb' | awk '{ print $1 }' )" | |
_HDMI_SINK="$( pactl list short sinks | grep 'hdmi' | awk '{ print $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
#!/bin/bash | |
# first, cd to your maps folder then execute this one liner | |
ls *.map | while read _map; do _m="$(echo $_map | awk -F '.' '{print $1}')"; echo "add_vote \"change map to $_m\" sv_map $_m"; done >> add_vote |
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
[teeworlds-overflows] | |
enabled = true | |
port = 8300:8310 | |
protocol = udp | |
filter = teeworlds-overflows | |
logpath = /var/log/teeworlds/*.log | |
maxretry = 2 | |
findtime = 2 | |
bantime = 60 |
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
Start vi, and type | |
:set fileformat=unix | |
Save it, 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
#!/bin/bash | |
# may require gawk if you get the following error: function strftime never defined | |
# thanks to minus and guest__ for help on teeworlds IRC chan | |
teeworlds-server -f test.conf | gawk '{match($0, /\[([0-9a-f]+)\](.*)/, a); if(a[1]!="")$1="[" strftime("%F %T", strtonum("0x" a[1])) "]"; $1=$1a[2]; print }' | |
# simpler way (doesn't convert, simply dump the system's time, fflush is required to not have buffering issues) | |
teeworlds-server -f test.conf | gawk 'BEGIN { FS="]"; OFS=FS } /^\[.+\]/ { $1="["strftime("%F %T", systime()); print; fflush() }' &>>/var/log/teeworlds/test.log & |
NewerOlder