Skip to content

Instantly share code, notes, and snippets.

View erdoukki's full-sized avatar
💭
I may be slow to respond.

Kerma Gérald erdoukki

💭
I may be slow to respond.
View GitHub Profile
@erdoukki
erdoukki / markdown-details-collapsible.md
Created February 27, 2022 01:11 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section containing markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
@erdoukki
erdoukki / dumb-ap-wired-link.sh
Created September 11, 2021 07:51 — forked from braian87b/dumb-ap-wired-link.sh
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE
@erdoukki
erdoukki / extroot.sh
Created September 1, 2021 16:13 — forked from nikescar/extroot.sh
openwrt extroot
#!/bin/sh
# openwrt extroot /dev/sda1 ext4 /dev/sda2 swap
# latest version https://downloads.openwrt.org/releases/19.07-SNAPSHOT/targets/ar71xx/generic/
opkg update
opkg install kmod-usb-storage kmod-scsi-core block-mount kmod-fs-ext4 kmod-usb-uhci e2fsprogs fdisk
echo "
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
@erdoukki
erdoukki / apache.lua
Created August 13, 2021 11:44 — forked from james2doyle/apache.lua
An example of a Lua script being run under Apache mod_lua. From http://httpd.apache.org/docs/current/mod/mod_lua.html
require "string"
--[[
http://httpd.apache.org/docs/current/mod/mod_lua.html
This is the default method name for Lua handlers, see the optional
function-name in the LuaMapHandler directive to choose a different
entry point.
--]]
function handle(r)
r.content_type = "text/plain"
@erdoukki
erdoukki / install-openjdk8-musl.sh
Created July 30, 2021 07:46 — forked from simonswine/install-openjdk8-musl.sh
Install alpine openjdk8 onto OpenWRT (armv7)
#!/bin/sh
set -o errexit
set -o nounset
set -o pipefail
set -x
REVISION=8.212.04-r0
URL=http://dl-cdn.alpinelinux.org/alpine/v3.10/community/armv7/
PACKAGES="openjdk8 openjdk8-jre openjdk8-jre-lib openjdk8-jre-base"

So, you want to be able to work from anywhere. You want to be on a mountain somewhere, two bars of 3G signal, and you forward that to your laptop with a WiFi hotspot. Open your laptop and your shell on remote is already open and as responsive as possible. Work/life balance? With power like this, who cares?

Problem Scenario

Often, in academic institutions at least, you have the following situation:

So, you want to be able to work from anywhere. You want to be on a mountain somewhere, two bars of 3G signal, and you forward that to your laptop with a WiFi hotspot. Open your laptop and your shell on remote is already open and as responsive as possible. Work/life balance? With power like this, who cares?

Problem Scenario

Often, in academic institutions at least, you have the following situation:

@erdoukki
erdoukki / WireGuard-site-to-site.md
Created July 7, 2021 12:58 — forked from insdavm/WireGuard-site-to-site.md
Accessing a subnet that is behind a WireGuard client using a site-to-site setup

WireGuard Site-to-Site

Accessing a subnet that is behind a WireGuard client using a site-to-site setup

Problem Summary

We want to access a local subnet remotely, but it is behind a NAT firewall and we can't setup port forwarding. Outgoing connections work, but all incoming connections get DROPPED by the ISP's routing policy.

Solution Summary

@erdoukki
erdoukki / OpenWrt detect new device and send text message.md
Created July 6, 2021 17:53 — forked from jwalanta/OpenWrt detect new device and send text message.md
Detect new network devices connecting to OpenWrt and send text message
@erdoukki
erdoukki / 99-login-german-fon
Created July 6, 2021 09:04 — forked from dks77/99-login-german-fon
Telekom_FON Hotspot: auto-login bash script wget germany wispr client openwrt
#!/bin/sh
# place this file at: /etc/hotplug.d/iface/99-login-telekom_fon
# based on source: https://gist.github.com/cusspvz/3ab1ea9110f4ef87f0d2e1cd134aca67
#
# loginscript for german telekom_FON hotspot (NOT the general Telekom Hotspot)
# technic: uses HTTP POST formular; extract URLs from WIPSr
#
# Preparations