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
# 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
# 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
#!/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 |