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 | |
# source: https://www.linuxquestions.org/questions/debian-26/apt-get-update-gets-stuck-while-reading-package-list-on-my-slug-795324/ | |
mv /var/lib/dpkg/status /var/lib/dpkg/status.broken.bak | |
cp /var/lib/dpkg/status-old /var/lib/dpkg/status | |
rm -rf /var/lib/apt/lists/* | |
dpkg --configure -a | |
aptitude update | |
aptitude upgrade |
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
[Unit] | |
Description=Check WS3080 USB Lock | |
After=network.target weewx.service | |
[Service] | |
PIDFile=/run/%I.pid | |
WorkingDirectory=/usr/share/weewx/user | |
ExecStart=/usr/share/weewx/user/chkusblck | |
KillSignal=SIGINT |
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 No-ip.com Dynamic DNS Updater | |
# | |
# By Nathan Giesbrecht (http://nathangiesbrecht.com) | |
# | |
# 1) Install binary as described in no-ip.com's source file (assuming results in /usr/local/bin) | |
# 2) Run sudo /usr/local/bin/noip2 -C to generate configuration file | |
# 3) Copy this file noip2.service to /etc/systemd/system/ | |
# 4) Execute `sudo systemctl enable noip2` | |
# 5) Execute `sudo systemctl start noip2` | |
# |
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
# /etc/logrotate.d/fr24feed | |
/var/log/fr24feed/fr24feed.log { | |
weekly | |
rotate 4 | |
missingok | |
notifempty | |
postrotate | |
invoke-rc.d rsyslog rotate >/dev/null 2>&1 || true | |
endscript | |
} |
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
# $Id: mqtt.py 1784 2018-08-26 15:46:33Z mwall $ | |
# Copyright 2013 Matthew Wall | |
""" | |
Upload data to MQTT server | |
This service requires the python bindings for mqtt: | |
pip install paho-mqtt | |
Minimal configuration: |
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
Reg add HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v RealTimeIsUniversal /t REG_QWORD /d 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
# assume : | |
# - openproject installed in /opt/openproject | |
# - local port: 6000 | |
# - external port: 6020 | |
server { | |
listen 6020; | |
server_name SERVER_DOMAIN_NAME; | |
root /opt/openproject/public; | |
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
WARNING: Unauthorized access to this system is forbidden and will be | |
prosecuted by law. By accessing this system, you agree that your actions | |
may be monitored if unauthorized usage is suspected. |
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
sudo apt-get install geoip-bin geoip-database-contrib |
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 | |
# based on script from http://www.axllent.org/docs/view/ssh-geoip | |
# based on script from https://gist.github.com/ManfMert/b34f098ad6e5094225ff9366ae4e9d7d | |
# License: WTFPL | |
# location /usr/local/bin | |
function private_ip() | |
{ | |
local ip=$1 | |
local stat=1 |