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 | |
INTERVAL="10s" | |
INPUT_DRIVER="coretemp" | |
#TEMP_PATH="/sys/class/hwmon/hwmon3/temp1_input" | |
FAN_CMD="/usr/bin/fan.sh" | |
# Find correct input temperature path | |
for hwmon in `ls /sys/class/hwmon/`; do | |
driver=$(</sys/class/hwmon/$hwmon/name) |
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 | |
CACHE_PATH=/var/cache/pacman/pkg | |
PRESERVE_MONTHS=3 | |
DELETED_SIZE=$(/usr/bin/find . ! -newermt "$PRESERVE_MONTHS months ago" -ls | awk -F' ' 'BEGIN {sum=0} {sum+=$7} END {print sum}' | numfmt --to=iec-i)B | |
/usr/bin/echo "Deleting $DELETED_SIZE of package files older than $PRESERVE_MONTHS months..." | |
/usr/bin/find $CACHE_PATH ! -newermt "$PRESERVE_MONTHS months ago" -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
# Custom scancode-keycode mappings for Interfree/BTC 9000 keyboard | |
# Old udev ABI (systemd<220) | |
#keyboard:name:AT Translated Set 2 keyboard:* | |
# New udev ABI (systemd>=220) | |
evdev:name:AT Translated Set 2 keyboard:* | |
KEYBOARD_KEY_de=power | |
KEYBOARD_KEY_df=sleep | |
KEYBOARD_KEY_e3=wakeup | |
KEYBOARD_KEY_ae=help |
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 | |
# upower-ksysguardd.sh - Script to poll upower tool with a ksysguardd | |
# compatible interface. Useful with kde/plasma's ksysguard system monitor. | |
# To use it, launch ksysguard, then File -> Connect Host, and choose | |
# "Custom command" (see https://techbase.kde.org/Development/Tutorials/Sensors). | |
# | |
# Copyright (C) 2017 Juma7C9 | |
# | |
# This program is free software; you can redistribute it and/or modify |
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 | |
# Request a letsencrypt cert for multiple domain and related subdomain, for example | |
# foo.domain.com, foo.domain.com | |
# bar.domain.net, bar.domain.net | |
# and encrypt the generated private key for security purposes. | |
# The MIT License (MIT) | |
# Copyright (c) 2016, 2017 Juma7C9 | |
# |
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
/* Simple program to test memory allocation - goes on until killed */ | |
#include "stdlib.h" | |
#include "stdio.h" | |
#define _256M 64*1024*1024 | |
int* p; | |
int i=0, j; | |
int main(){ |
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 | |
# fan.sh - Script to stop and restart (setting to auto) fans on Asus Zenbook UX32A | |
# (should work also on other UX-series models - see http://goo.gl/BKcWm1) | |
# Requires acpi_call kernel module - see https://github.com/mkottman/acpi_call/) | |
# USAGE: fan.sh auto|stop|full | |
# Copyright (C) 2014-2023 Juma7C9 | |
# | |
# 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 |
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 | |
# net_speed.sh -- A simple real time network traffic monitor | |
# USAGE: net_speed.sh interface | |
# Copyright (C) 2013 Juma7C9 | |
# | |
# 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 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 | |
# report.sh - Script to report number of ssh login attempts, and banned IPs by fail2ban. | |
# Copyright (C) 2013 Juma7C9 | |
# | |
# 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 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 | |
# Script to configure Linux' iptables and ip6tables | |
# setting the specified ports open and closing the rest. | |
# Optionally enables Fail2Ban on IPv4 (as the latest | |
# stables version [0.9.5] does not support it yet). | |
# The MIT License (MIT) | |
# Copyright (c) 2013-2016 Juma7C9 | |
# |