Skip to content

Instantly share code, notes, and snippets.


k0nsl k0nsl

View GitHub Profile
k0nsl / centos7-wifi-hotspot
Created Feb 14, 2021
Centos 7 Wi-Fi Hotspot (nmcli)
View centos7-wifi-hotspot
This is probably the simplest way to create a Wi-Fi hotspot in Centos 7:
nmcli dev wifi hotspot ifname wifi-interface ssid "k0nsl-wifi" password "unsecure"
k0nsl /
Created Jul 28, 2020
A sort of "set and forget" type of operation in order to not have your resolv.conf overwritten; uses two Danish resolvers (unicast and anycast respectively). Can be run once or placed in "/etc/cron.hourly" as "keep-resolvconf" -- remember to make it executable too. That is all.
## this file can live in /etc/cron.hourly as "keep-resolvers".
sudo chattr -i /etc/resolv.conf
sudo chattr -e /etc/resolv.conf
sudo rm -f /etc/resolv.conf
sudo touch /etc/resolv.conf.tmp
sudo echo "nameserver" >> /etc/resolv.conf.tmp
sudo echo "nameserver" >> /etc/resolv.conf.tmp
k0nsl /
Last active May 2, 2020
Remove non-critical packages (Debian)
# ref.
apt-get remove acpi acpid aptitude at aspell aspell-en avahi-daemon bash-completion bc bin86 bind9-host ca-certificates console-common console-data console-tools dc debian-faq debian-faq-de debian-faq-fr debian-faq-it debian-faq-zh-cn dhcp dhcp3-client dnsutils doc-debian eject fdutils file finger foomatic-filters gettext-base groff gnupg gnu-efi hplip iamerican ibritish info ispell laptop-detect libavahi-compat-libdnssd1 libc6-amd64 manpages mtools mtr-tiny mutt netcat net-tools ncurses-term openssh-client openssh-server openssl pidentd ppp pppconfig pppoe pppoeconf read-edid reportbug ssh tasksel tcsh traceroute unzip usbutils vim-common vim-tiny wamerican w3m whois zeroinstall-injector zip -y
apt-get update
#clear log files recursively:
for i in $(find /var/log -type f); do cat /dev/null > $i; done
k0nsl /
Created Apr 30, 2017 — forked from pascalpoitras/
My always up-to-date WeeChat configuration (weechat-dev)

WeeChat Screenshot

Enable mouse support

/mouse enable

Encrypted password in sec.conf

k0nsl / gist:1aace9f2ca8e29a8dea7e4ac34131e8d
Created Apr 30, 2017 — forked from csexton/gist:3772971
/etc/init.d/znc startup script
View gist:1aace9f2ca8e29a8dea7e4ac34131e8d
#! /bin/sh
# Provides: znc
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: znc initscript
# Description: This is the init-Script for znc.
# Author: Henner M. Kruse
k0nsl /
Created Apr 16, 2017 — forked from narolinus/
Mailcow: Fetching external resources and convert stylesheets accordingly.
# reuires google-font-download by Clemens Lang
# 1) Put both scripts in mailcow-dockerized home directory.
# 2) Reset data/web to default (only css, fonts an js).
# rm -rf data/web/{css,fonts,js} && git checkout -- data/web && git status
# 3) Run
err502=`curl -1IsS --ciphers ecdhe_ecdsa_aes_128_sha | grep 502`
if [[ "$err502" == *"502"* ]]; then
/sbin/service php-fpm restart
date >> /site/tools/php-fpm-restart.log
k0nsl /
Created Apr 4, 2017 — forked from lowstz/
Linux openvpn auto reconnect script
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
### Thanks Xream's Work XD
# if you don't have several vpn servers to select, you can comment following line
# and use your openvpn config file name to replace "${host}.ovpn" in while loop.
read -p "Select the host: " host
k0nsl / A - Information
Created Mar 29, 2017 — forked from Doonga/A - Information
Plex NGINX reverse proxy config using Cloudflare on Ubuntu 16.04
View A - Information
Credit where credit's due, I mainly used these 3 resources to get this all working. There were several others but I don't exactly remember which is which. So at least here are the 3 main places that I used.
The vast majority of this came from this link, the others helped me make it work for Plex.
The data flow here is: