Skip to content

Instantly share code, notes, and snippets.

View vdvm's full-sized avatar

Attila van der Velde vdvm

View GitHub Profile
@vdvm
vdvm / power-monitoring-homewizard-energy-socket.yaml
Created May 15, 2026 18:24
Home Assistant blueprint: monitort of een slimme stekker van HomeWizard actief is (aan of schakelslot) én of er stroomverbruik gedetecteerd wordt. Stuurt een kritieke notificatie en een persistente dashboardmelding als er iets mis is.
blueprint:
name: Power monitoring HomeWizard Energy Socket
description: >-
Monitort of een slimme stekker van HomeWizard actief is (aan of schakelslot)
én of er stroomverbruik gedetecteerd wordt. Stuurt een kritieke notificatie
en een persistente dashboardmelding als er iets mis is.
domain: automation
input:
stekker_naam:
name: Naam van de stekker
@vdvm
vdvm / main.go
Created June 16, 2023 11:05
Diceware Password Generator by ChatGPT
package main
import (
"bufio"
"flag"
"fmt"
"log"
"math/rand"
"os"
"strings"
@vdvm
vdvm / .editorconfig
Created July 22, 2017 10:25
EditorConfig
# top-most EditorConfig file
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@vdvm
vdvm / www.conf
Created October 16, 2016 14:17 — forked from evansolomon/www.conf
PHP-FPM config
; Start a new pool named 'www'.
; the variable $pool can we used in any directive and will be replaced by the
; pool name ('www' here)
[www]
; Per pool prefix
; It only applies on the following directives:
; - 'slowlog'
; - 'listen' (unixsocket)
; - 'chroot'
#!/usr/bin/env bash
set -e
if [[ -e /home/core/volumes/consul/raft/peers.json ]] && [[ $(cat /home/core/volumes/consul/raft/peers.json | jq '. | length') -ge 3 ]]; then
echo "CONSUL_BOOTSTRAP=\"\"" > /tmp/consul-env
exit
fi
if [[ MACHINES=$(etcdctl ls /consul.io/machines | grep -v ${HOSTNAME}) ]] && [[ ${#MACHINES[@]} -ge 1 ]]; then
for MACHINE in "$MACHINES"; do
@vdvm
vdvm / sesscache.go
Created June 23, 2015 10:01
Distributed PHP sessions using memcached extension and coreos/etcd (PoC)
package main
import (
"bufio"
"fmt"
"net"
"regexp"
"runtime"
"strconv"
"strings"
@vdvm
vdvm / CentOS-6.md
Last active August 29, 2015 14:17
PCextreme Linux Software repository
cat > /etc/yum.repos.d/pcextreme.repo << EOL
[pcextreme-main]
name=PCextreme Software Repository for CentOS 6 - \$basearch
baseurl=http://packages.pcextreme.nl/centos/6/main/\$basearch/
enabled=1
gpgcheck=1
gpgkey=https://www.pcextreme.nl/pcextreme_signing.key
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-pcextreme
@vdvm
vdvm / wifi.mobileconfig
Created January 16, 2015 11:04
Apple configuratieprofiel: wifi.mobileconfig
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Inc//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadVersion</key>
<integer>1</integer>
<key>PayloadUUID</key>
<string>{{ UUID_1 }}</string>
<key>PayloadType</key>
<string>Configuration</string>

Keybase proof

I hereby claim:

  • I am vdvm on github.
  • I am vdvm (https://keybase.io/vdvm) on keybase.
  • I have a public key whose fingerprint is 6B4F 9ACB A175 F1F3 12CF 9817 D4F5 10F1 A8EA B676

To claim this, I am signing this object:

@vdvm
vdvm / mysql_secure_installation.md
Created December 23, 2014 15:01
mysql_secure_installation queries

Set root password:

UPDATE mysql.user SET Password=PASSWORD('mysecret') WHERE User='root';
FLUSH PRIVILEGES;

Remove anonymous users: