Skip to content

Instantly share code, notes, and snippets.

@HoracioDos
HoracioDos / fix-broken-apt-get-update.sh
Created August 9, 2021 13:36 — forked from rashkopetrov/fix-broken-apt-get-update.sh
Fix `Error: Timeout was reached ` when doing `apt-get update`
#!/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
@HoracioDos
HoracioDos / noip2.service
Created May 9, 2019 20:01 — forked from NathanGiesbrecht/noip2.service
Systemd Service file for no-ip.com dynamic ip updater
# 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`
#
@HoracioDos
HoracioDos / openproject.conf
Last active August 24, 2018 22:20 — forked from seLain/openproject.conf
nginx config for openproject
# assume :
# - openproject installed in /opt/openproject
# - local port: 6000
# - external port: 6020
server {
listen 6020;
server_name SERVER_DOMAIN_NAME;
root /opt/openproject/public;
@HoracioDos
HoracioDos / sshfilter.sh
Last active August 24, 2018 14:22 — forked from jokey2k/sshfilter.sh
Modified version of sshfilter.sh to allow for ipv6 and local IP filtering
#!/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