Skip to content

Instantly share code, notes, and snippets.

View nomionz's full-sized avatar
🦈
sharker

nikita.efimov nomionz

🦈
sharker
  • 15:59 (UTC +02:00)
View GitHub Profile
@theprojectsomething
theprojectsomething / An Ubuntu WiFi Secure Captive Portal.md
Last active June 7, 2024 13:44
Guide: An Ubuntu WiFi Secure Captive Portal: Network Manager / DNSMasq / HA Proxy / Let's Encrypt

An Ubuntu WiFi Secure Captive Portal

Improvements, suggestions & fixes are welcome!

Captive portals can be a pain. Here's an opinionated and no-doubt entirely imperfect guide to setting one up for a WiFi access point on Ubuntu (tested on 20+), utilising Network Manager, DNSMasq, HA Proxy and (optionally) Let's Encrypt for a secure, locally hosted landing page.

_Note: This setup was originally designed for an offline WLAN, providing access to a small number of locally hosted domains ... think the WiFi media portal on a flight or boat. If you are looking to provide internet access behind a captive portal then this guide won't get you all the way there. That said, many routers have this capability built in, as do any number of open source router firmware solutions. So you probably don't need to roll your own. If you'd like to try anyway, Ha Proxy Stick Tables would probably come in handy. Very happy to update the guide with any p

@Sotatek-NuiTran
Sotatek-NuiTran / multi_ssh_git.md
Last active May 11, 2024 17:21
Setup SSH keys for multiple github and gitlab account

Setup SSH keys for multiple github and gitlab account

Prepare SSH keys:

Add a new key

$ ssh-keygen -t rsa_new -C "your_email@youremail.com"

Start ssh-agent

$ eval `ssh-agent -s`
@vishnuhd
vishnuhd / mysql-client-k8s.md
Created August 22, 2019 13:21
mysql-client in Kubernetes to test your connection to mysql server

mysql-client in Kubernetes to test your connection to mysql server

kubectl run mysql-client --image=mysql:5.7 -it --rm --restart=Never -- /bin/bash

mysql -h mysql-service -uroot -proot_password -e 'SHOW databases;'

OR

mysql -h mysql-service -uroot -proot_password

@narate
narate / create-hotspot.md
Last active June 22, 2024 23:51
Create Wi-Fi Hotspot on Linux using nmcli

Create a Wi-Fi hotspot on Linux using nmcli

Original post : https://unix.stackexchange.com/a/310699

nmcli con add type wifi ifname wlan0 con-name Hostspot autoconnect yes ssid Hostspot
nmcli con modify Hostspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli con modify Hostspot wifi-sec.key-mgmt wpa-psk
nmcli con modify Hostspot wifi-sec.psk "veryveryhardpassword1234"
@devodo
devodo / gist:8b39748d65e8185fbd89
Created March 16, 2016 11:43
PostgreSQL create UUID max aggregate function
CREATE OR REPLACE FUNCTION max (uuid, uuid)
RETURNS uuid AS $$
BEGIN
IF $1 IS NULL OR $1 < $2 THEN
RETURN $2;
END IF;
RETURN $1;
END;
$$ LANGUAGE plpgsql;