This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Getting last image..." | |
LastImage="$(curl -s https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/x86_64/ | sed -n 's/.*"\(alpine-extended-[[:digit:]\.]*-x86_64.iso\)".*/\1/p' | sort -r | head -n 1)" | |
LastVer="$(echo $LastImage | sed -n 's/alpine-extended-\([[:digit:]\.]*\)-x86_64.iso/\1/p')" | |
LastMVer="$(echo $LastVer | sed -n 's/\([[:digit:]]*\.[[:digit:]]*\).*/\1/p')" | |
CurrentVer="$(cat /media/usb/.alpine-release | sed -n 's/alpine-extended-\([[:digit:]\.]*\).*/\1/p')" | |
CurrentMVer="$(echo $CurrentVer | sed -n 's/\([[:digit:]]*\.[[:digit:]]*\).*/\1/p')" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[sms-in] | |
exten => _.,1,NoOp(Inbound SMS dialplan invoked) | |
exten => _.,n,NoOp(To ${MESSAGE(to)}) | |
exten => _.,n,NoOp(From ${MESSAGE(from)}) | |
exten => _.,n,NoOp(Body ${MESSAGE(body)}) | |
exten => _.,n,Set(ACTUAL_FROM=${MESSAGE(from)}) | |
exten => _.,n,Set(HOST_TO=${CUT(MESSAGE(to),@,2)}) | |
exten => _.,n,Set(NUMBER_TO=${MESSAGE_DATA(X-SMS-To)}) | |
exten => _.,n,Gosub(sms-in,T_${NUMBER_TO},1) | |
exten => _.,n,Hangup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addEventListener('fetch', function(event) { | |
const { request } = event | |
const response = handleRequest(request).catch(handleError) | |
event.respondWith(response) | |
}) | |
async function handleRequest(request) { | |
const { method, url } = request | |
const { host, pathname } = new URL(url) | |
if(pathname == '/download') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# Written for EdgeOS, probably works on vyos and vyatta as well. | |
# Writes full (tar based) backup to /tmp, then uploads it to each of the commit archive locations. | |
# Doesn't do cycling or anything: Just router-full-backup-2021-02-16.tar.gz fired at where you store commits every whenever | |
# Things to do if I weren't lazy: | |
# Make it a package, with its own configuration trees | |
# Encrypt each backup using public key or private key crypto: your choice! | |
# Make it cycle backups automatically |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request, abort, g | |
from functools import wraps | |
from uuid import uuid4 | |
from flask_basicauth import BasicAuth | |
import json | |
import db | |
import re | |
app = Flask(__name__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request, abort, g | |
from functools import wraps | |
from uuid import uuid4 | |
import json | |
import db | |
app = Flask(__name__) | |
def require_appkey(view_function): | |
@wraps(view_function) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ ! -d "$1" ]; then | |
echo "Instructions: | |
./procacls.sh /Path/To/Folder 'user:myuser@domain.path:rwx,group:mygroup@domain.path:rwx' | |
Outputs * for each record processed." | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Brian Bidulock <bidulock@openss7.org> | |
pkgname=http-parser-git | |
pkgver=2.7.1.r11.gfd3850c | |
pkgrel=1 | |
pkgdesc="Parser for HTTP Request/Response written in C" | |
arch=('i686' 'x86_64' 'armv7h') | |
url="https://github.com/nodejs/http-parser" | |
license=('MIT') | |
depends=('glibc') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright Joyent, Inc. and other Node contributors. All rights reserved. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to | |
# deal in the Software without restriction, including without limitation the | |
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
# sell copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[builder@archbuilder http-parser-git]$ git clone https://github.com/nodejs/http-parser.git | |
Cloning into 'http-parser'... | |
remote: Counting objects: 1496, done. | |
remote: Total 1496 (delta 0), reused 0 (delta 0), pack-reused 1496 | |
Receiving objects: 100% (1496/1496), 671.92 KiB | 3.77 MiB/s, done. | |
Resolving deltas: 100% (921/921), done. | |
[builder@archbuilder http-parser-git]$ cd http-parser | |
[builder@archbuilder http-parser]$ make library | |
cc -I. -DHTTP_PARSER_STRICT=0 -Wall -Wextra -Werror -O3 -fPIC -c http_parser.c -o libhttp_parser.o | |
cc -shared -Wl,-soname=libhttp_parser.so.2.7 -o libhttp_parser.so.2.7.1 libhttp_parser.o |
NewerOlder