Skip to content

Instantly share code, notes, and snippets.

@jow-
jow- / Makefile
Created September 14, 2020 07:31
Makefile for utpl
#
# Copyright (C) 2020 Jo-Philipp Wich <[email protected]>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=utpl
@jow-
jow- / dsaconfig.sh
Last active October 22, 2023 12:58
UCI configuration support for DSA VLAN filtering
#!/bin/sh
# This is /lib/network/dsaconfig.sh
. /lib/functions/network.sh
switch_names=""
clear_port_vlans() {
local port=$1
local self=$2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jow-
jow- / luci-proto-modemmanager.json
Created January 31, 2020 08:52
Patched modemmanager to retrieve modem list from mmcli
{
"luci-proto-modemmanager": {
"description": "Grant access to mmcli",
"read": {
"cgi-io": [ "exec" ],
"file": {
"/usr/bin/mmcli -L": [ "exec" ],
"/usr/bin/mmcli -m [0-9]": [ "exec" ]
}
}
@jow-
jow- / httpclient.diff
Created December 9, 2019 07:50
Allow scoped IPv6 addresses.
diff --git a/libs/luci-lib-httpclient/luasrc/httpclient.lua b/libs/luci-lib-httpclient/luasrc/httpclient.lua
index 79ce41294..7a335a016 100644
--- a/libs/luci-lib-httpclient/luasrc/httpclient.lua
+++ b/libs/luci-lib-httpclient/luasrc/httpclient.lua
@@ -105,13 +105,18 @@ function parse_url(uri)
rest = tmp
end
- url.host, tmp = rest:match("^%[([0-9a-fA-F:]+)%](.*)$")
+ url.host, tmp = rest:match("^%[(.+)%](.*)$")
@jow-
jow- / luci.js.diff
Created November 22, 2019 18:43
Fixing concurrent super() calls
diff --git a/modules/luci-base/htdocs/luci-static/resources/luci.js b/modules/luci-base/htdocs/luci-static/resources/luci.js
index 7c1831376..3433da396 100644
--- a/modules/luci-base/htdocs/luci-static/resources/luci.js
+++ b/modules/luci-base/htdocs/luci-static/resources/luci.js
@@ -67,7 +67,7 @@
* It provides simple means to create subclasses of given classes and
* implements prototypal inheritance.
*/
- var superContext = null, Class = Object.assign(function() {}, {
+ var superContext = {}, Class = Object.assign(function() {}, {
#!/bin/sh
. /lib/functions.sh
. ../netifd-proto.sh
init_proto "$@"
append_args() {
while [ $# -gt 0 ]; do
append cmdline "'${1//\'/\'\\\'\'}'"
shift
done
@jow-
jow- / openconnect.diff
Created October 8, 2019 12:57
openconnect quoting fix
diff --git a/net/openconnect/files/openconnect.sh b/net/openconnect/files/openconnect.sh
index 15bd3b5a5..1f0c7aeed 100755
--- a/net/openconnect/files/openconnect.sh
+++ b/net/openconnect/files/openconnect.sh
@@ -3,6 +3,13 @@
. ../netifd-proto.sh
init_proto "$@"
+append_args() {
+ while [ $# -gt 0 ]; do
@jow-
jow- / local-lvm-storage.yaml
Last active May 2, 2019 06:32
Deploy Local LVM Storage provisioner v0.10.2
apiVersion: v1
kind: Namespace
metadata:
name: local-lvm-storage
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: local-lvm-provisioner-service-account
namespace: local-lvm-storage
@jow-
jow- / make-signatures.pl
Last active October 3, 2017 11:41
A Perl script to update the key signature listing of https://lede-project.org/docs/user-guide/signatures
#!/usr/bin/env perl
use strict;
use warnings;
use locale;
use POSIX qw(mktime strftime setlocale LC_COLLATE);
setlocale(LC_COLLATE, "en_US.UTF-8");