Skip to content

Instantly share code, notes, and snippets.

@FAUSheppy
FAUSheppy / firefox-limited.service
Created October 15, 2021 10:27
Firefox Systemd Service to Limite Usage
[Unit]
Description=Systemd Firefox
After=network.target
[Service]
WorkingDirectory=/home/username
Environment=DISPLAY=:0
Environment=XDG_RUNTIME_DIR=/run/user/userid
Type=simple
@FAUSheppy
FAUSheppy / zsh-fix.sh
Created October 12, 2021 23:08
ZSH color red fix
if [[ $FIRST_RUN == "FALSE" ]]; then
;
else
FIRST_RUN="FALSE"
export FIRST_RUN
exec zsh
fi
@FAUSheppy
FAUSheppy / ZSH-libcolor-conf.zsh
Created October 12, 2021 23:07
ZSH-libcolor-conf
LD_PRELOAD="/absolute/path/to/libcoloredstderr.so"
COLORED_STDERR_FDS=2,
export LD_PRELOAD COLORED_STDERR_FDS
@FAUSheppy
FAUSheppy / build-lib-color-stderr-red.sh
Last active October 17, 2021 17:05
building lib-color-stderr
autoreconf -fsi
./configure
make
@FAUSheppy
FAUSheppy / sheepit.service
Last active October 15, 2021 07:05
SheepIt Systemd Service
[Unit]
Description=Sheepit render farm during nights
After=network.target
[Service]
Type=simple
User=user-to-start-as
WorkingDirectory=/absolute/path/to/sheepit-cache-dir/
ExecStart=/absolute/path/to/executable/script/
@FAUSheppy
FAUSheppy / sheepit-run.sh
Created October 12, 2021 18:42
sheep-it client command line
/usr/bin/java -jar sheepit-client-6.21175.0.jar
-ui text
-cache-dir /tmp/sheepit-cache/
-compute-method CPU
-login Sheppy
-password YOUR_TOKEN
-memory 5G
-request-time 1:00-10:00
@FAUSheppy
FAUSheppy / signal-cli-commands.sh
Created October 4, 2021 14:23
Command Collection signal-cli
signal-cli -u YOUR_USERNAME_OR_PHONE send -m "This is a message" RECIPIENT_NAME_OR_PHONE
signal-cli send -m "This is a message" RECIPIENT_NAME_OR_PHONE // -u ommited
signal-cli updateProfile --name YOUR_USERNAME
signal-cli updateProfile --avatar /path/to/image.png_or_jpg
signal-cli listContacts
@FAUSheppy
FAUSheppy / Notification.config
Created September 29, 2021 01:41
Notification
apply Notification "signal-generic" to Service {
import "mail-service-notification"
user_groups = ["icingaadmins"]
command = "telegram-service-notification"
assign where host.address
}
@FAUSheppy
FAUSheppy / notification-command-long.conf
Last active October 4, 2021 14:28
Notification Command script
object NotificationCommand "signal-service-notification" {
command = [ "/etc/icinga2/monitoring-tools/signal-notify.py" ]
arguments += {
"-4" = "$notification_address$"
"-6" = "$notification_address6$"
"-b" = "$notification_author$"
"-c" = "$notification_comment$"
"-d" = {
required = true
@FAUSheppy
FAUSheppy / icinga-notification-command.conf
Created September 29, 2021 00:29
Icinga Notification Command
object NotificationCommand "signal-service-notification" {
command = [ "/usr/bin/curl", "-X", "POST", "-H", "Content-Type:
application/json", "--data", "
{ 'service_name' : 'hello world',
service_type : '$notification_type$' }",
"localhost:6000/send-all-icinga"]
}