Skip to content

Instantly share code, notes, and snippets.

View bglnelissen's full-sized avatar

Bastiaan Nelissen bglnelissen

View GitHub Profile
@bglnelissen
bglnelissen / SCX-3400.ppd
Last active March 31, 2025 19:56
Working ppd file for my RasperryPi CUPS server for the Samsung SCX-3400 Series, like my SCX-3405w
*PPD-Adobe: "4.3"
*% PPD file for Samsung SCX-3400 Series with CUPS
*% created by b.nelissen
*% based on: https://gitlab.com/ScumCoder/splix/-/blob/patches/splix/ppd/m2020.ppd
*% free to use and mod
*% ... it was a huge hassle to get this one working ...
*FormatVersion: "4.3"
*FileVersion: "2.0.0"
*LanguageVersion: English
@bglnelissen
bglnelissen / wg-json-geoip.sh
Last active August 8, 2021 21:00
script that creates json output from the wireguard `wg show all` output and adds the geoiplookup location
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (C) 2015-2020 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
# modified by b.nelissen
# added (~hacked) geoiplookup support
exec < <(exec wg show all dump)
printf '{'
@bglnelissen
bglnelissen / README.md
Last active May 25, 2020 17:09
mqtt and Homekit for Shelly 1 with Tasmota

This flow can turn the Shelly 1 with Tasmota on or off and sets the user interface accordingly.

The flow works in 2 ways:

  1. It set the values using Homekit or Node-RED UI and send the mqtt commands.
  2. It listens to the mqtt commands and set the switches in the Home app & Node-RED UI accordingly.

This way you can also control the light using a direct switch on the Shelly device and your user interface correctly shows on or off.

This flow has some custom javascript because that is my preferred way to handle the message (msg) flow. This flow also prevents to go in an infinite loop which seems to be a feature of homekit-service.

@bglnelissen
bglnelissen / mac-vendor.txt
Created May 10, 2020 10:18 — forked from aallan/mac-vendor.txt
List of MAC addresses with vendors identities
000000 Officially Xerox
000001 SuperLAN-2U
000002 BBN (was internal usage only, no longer used)
000003 XEROX CORPORATION
000004 XEROX CORPORATION
000005 XEROX CORPORATION
000006 XEROX CORPORATION
000007 XEROX CORPORATION
000008 XEROX CORPORATION
000009 powerpipes?
@bglnelissen
bglnelissen / OOMarkdown.bas
Created April 8, 2016 08:45 — forked from jekamax/OOMarkdown.bas
Macro allow using of markdown syntax while writing in LibreOffice or OpenOffice
'*** Markdown formatter for Libre(open)Office ****
' (pre-alpha-demo)
' Author: Jeka [email protected]
' License: No any warranties blah blah blah...
' Send me real postcard if you Like to use it
'
' Features: format headers verbatim blocks and formulas
' according to Markdown syntax
'
' Install: Open Tools->Macros->Organize Macros->LibreOffice Basic
@bglnelissen
bglnelissen / osx_install.sh
Created February 23, 2016 10:21 — forked from t-io/osx_install.sh
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@bglnelissen
bglnelissen / PHPtoICS.php
Created February 21, 2016 11:58 — forked from jakebellacera/ICS.php
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
// Variables used in this script:
// $summary - text title of the event
// $datestart - the starting date (in seconds since unix epoch)
// $dateend - the ending date (in seconds since unix epoch)
// $address - the event's address
// $uri - the URL of the event (add http://)
// $description - text description of the event
// $filename - the name of this file for saving (e.g. my-event-name.ics)
//
#!/bin/bash
#
# transcode-video.sh
#
# Copyright (c) 2013-2014 Don Melton
#
about() {
cat <<EOF
$program 4.0 of October 23, 2014