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
// Receives Twilio SMS WebHook and sends message via Telegram | |
// | |
//Define the following as variables on CF: | |
// - ACCESS_USER (encrypt): long unpredictible string, shared with Twilio | |
// - ACCESS_PASS (encrypt): long unpredictible string, shared with Twilio | |
// - TELEGRAM_CHAT_ID: chat id for Telegram conversation | |
// - TELEGRAM_API_TOKEN (encrypt): API token for Telegram intragration | |
// | |
// Configure Twilio with SMS WebHook to call https://<ACCESS_USER>:<ACCESS_PASS>@<worker name>.<cf login>.workers.dev/notify | |
// e.g. https://foo:bar@twilio-telegram-fwd.superuser123.workers.dev/notify |
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 | |
### Improved IOMMU/PCIe list script | |
# The script was originally authored by Roliga (https://gist.github.com/Roliga/d81418b0a55ca7682227d57af277881b) | |
# This version changes: | |
# 1) enable listing of devices even if IOMMU is disabled | |
# 2) add support for NVMe & SAS block devices | |
# 3) display disks serial & firmware (if available) | |
# 4) QOL improvements: disabled paging by default; don't crash on missing lsusb |
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
class DisableEnableHomeKitWebHook implements HttpRequestHandler { | |
readonly devType = 'Camera'; | |
readonly roomName = 'Inside'; | |
// readonly roomName = 'Outside'; | |
readonly sharedSecret = 'kfjshflhwfiwheifhawleichiewchewiucahewihc'; | |
async onRequest(request: HttpRequest, response: HttpResponse) { | |
const query = this.getQueryParams(request); | |
if (!this.verifySecret(query)) { | |
response.send("Invalid secret"); |
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 | |
# See https://www.qemu.org/docs/master/system/invocation.html?highlight=smbios#hxtool-4 | |
declare -A smb0 | |
declare -A smb1 | |
declare -A smb2 | |
declare -A smb3 | |
declare -A smb4 | |
declare -A smb11 | |
declare -A smb17 |
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 | |
set -e -o errexit -o pipefail -o nounset | |
################################### | |
# This script can be used by itself, but it's recommended that you read | |
# a tutorial on Proxmox forum first: https://forum.proxmox.com/threads/hey-proxmox-community-lets-talk-about-resources-isolation.124256/ | |
################################### | |
# Do not modify these variables (set by Proxmox when calling the script) | |
vmId="$1" |
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
/** | |
* This CloudFlare worker code forwards text messages from Twilio to your Telegram chat. | |
* | |
* You need to define the following variables in CloudFlare: | |
* ACCESS_USER - any user | |
* ACCESS_PASS - any password | |
* TELEGRAM_API_TOKEN - get from @BotFather | |
* TELEGRAM_CHAT_ID - get from https://api.telegram.org/bot<TELEGRAM_API_TOKEN>/getUpdates after messaging the bot | |
* | |
* Then set the following URL in Twilio as a POST WebHook: |
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
<?xml version="1.0"?> | |
<ruleset name="Lab Companion" namespace="NoFlash\LabCompanion\CS\Standard"> | |
<config name="installed_paths" value="../../slevomat/coding-standard"/> | |
<ini name="memory_limit" value="512M"/> | |
<arg name="colors"/> | |
<arg name="basepath" value="."/> | |
<arg name="parallel" value="8" /> | |
<autoload>./vendor/autoload.php</autoload> | |
<file>src</file> |
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 | |
set -e | |
if [ "$#" -ne 3 ]; then | |
# Example to keep 7 copies: backup-truenas.sh tnsHome /mnt/backup/server 7 | |
echo "Usage: ${0} StableID DestinationDir KeepCopies" | |
exit 1 | |
fi | |
stableId="${1}" |
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 | |
#set -e | |
set -o errexit -o pipefail -o noclobber -o nounset | |
if [ "$#" -ne 4 ]; then | |
echo "Usage: ${0} CertTargetDir CertName OutputFormat<pem|p12> AssociatedService" | |
exit 1 | |
fi | |
certTargetDir="${1}" |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/wait.h> | |
int main(int argc, char* argv[]) { | |
char *args[]={argv[0], "UDP4-LISTEN:123,fork", "UDP:example.com:123", NULL}; | |
setuid(0); | |
pid_t pid; |
NewerOlder