Skip to content

Instantly share code, notes, and snippets.

View fvdm's full-sized avatar
🦖
I may be slow to respond

Franklin fvdm

🦖
I may be slow to respond
View GitHub Profile

Keybase proof

I hereby claim:

  • I am fvdm on github.
  • I am fvdm (https://keybase.io/fvdm) on keybase.
  • I have a public key ASAyX5-yLgqCT-ZYVwdO6e_9cjdCHf0BRl3P5Vm6yEIdNwo

To claim this, I am signing this object:

@fvdm
fvdm / wgstats.sh
Last active June 19, 2024 17:59
Bash script to list stats for connected WireGuard clients
#!/bin/bash
# Human readable statistics for connected WireGuard clients
#
# Source: https://gist.github.com/fvdm/cb5b90541b076914ee897d048cd4f549
#
# This script is following the 'wireguard-manager' storage
# Filenames: [wg_iface]-client-[name].conf
#
# Set 'wg_clients' to the path where client configs are saved
@fvdm
fvdm / homeyscript_fritzbox_wan.js
Last active June 17, 2024 15:39
HomeyScript for saving FritzBox WAN speed counters in Homey variables
/**
* Request bandwidth monitor stats from Fritz!Box
*
* Values are converted to megabits per second
* The user must have permission to access the Fritz!Box settings
* Set the existing number-variable names in the `saveMap` object keys
*
* @see {@link https://gist.github.com/fvdm/d2c36c9c26e3df8a56fdc12d943aa469}
*/
@fvdm
fvdm / homeyscript_waitms.js
Last active February 17, 2024 12:54
HomeyScript to stall the flow a number of minutes, seconds or millieconds (default)
/**
* HomeyScript to stall the flow a number of [m]inutes, [s]econds or [m]illi[s]econds (default)
*
* @example 2 -> waiting 2ms
* @example 2m -> waiting 2 min
* @example 2s -> waiting 2 seconds
*
* @see {@link https://gist.github.com/fvdm/23a77945799d204512877caf87aee9a2}
*/
@fvdm
fvdm / homeyscript_parseint.js
Last active February 17, 2024 12:40
HomeyScript to parse an integer from any argument type within a flow. The result is provided in the `value` tag. You can optionally set a different output type: `number` (default), `string` or `bool`.
/**
* Parse the argument to an integer of `number` type.
* Optionally you can enforce the output type to `number` (default), `string` or `bool`.
* The result is provided in the `value` tag.
*
* @example '22:00' -> 22
* @example '22:00 string' -> '22'
* @example '22:00 bool' -> true
* @example '0 bool' -> false
*
@fvdm
fvdm / homeyscript_datum.js
Last active April 30, 2024 00:15
HomeyScript for simple date calculation within a flow. The date class is using the timezone configured in the Homey settings. The result is provided as card tags which can be used in cards that come after. Make sure to add delays to the cards that use these tags, because HomeyScripts are executed async.
/**
* Get current date and time as card tags
* Optional date offset calculation using Homey's timezone
* suffix: [y]ears, [m]onths, [d]ays, [h]ours, m[i]nutes, [s]econds, [m]illi[s]econds
*
* @example
* // two months ago
* '-2m'
*
* @example

Keybase proof

I hereby claim:

  • I am fvdm on github.
  • I am fvdm (https://keybase.io/fvdm) on keybase.
  • I have a public key ASAS4VBijLQUJfPqff4YybLRQpbqtJpvFjCJmj7hqaO1Uwo

To claim this, I am signing this object:

@fvdm
fvdm / Resource abuse.1blockpkg
Last active November 26, 2017 15:38
1Blocker package - anti resource abuse/cryptomining scripts - based on other lists
[
{
"id": "EC1657C2-44A7-446C-8E2F-D2D6D2A9BAB1",
"name": "Resource abuse",
"rules": [
{
"content": {
"action": {
"type": "block"
},
@fvdm
fvdm / Three Wise Monkeys.md
Created July 19, 2017 11:41
Three Wise Monkeys (NDA)

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

@fvdm
fvdm / homebrew.mxcl.pdnsrec.plist
Created July 7, 2017 20:46 — forked from kometchtech/homebrew.mxcl.pdnsrec.plist
powerdns recursor for Mac OSX
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.pdnsrec</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/pdnsrec/sbin/pdns_recursor</string>
</array>