Skip to content

Instantly share code, notes, and snippets.

@Bouni
Bouni / print256colours.sh
Created June 9, 2023 08:58 — forked from HaleTom/print256colours.sh
Print a 256-colour test pattern in the terminal
#!/bin/bash
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
set -eu # Fail on errors or undeclared variables
printable_colours=256
@Bouni
Bouni / solar.py
Last active December 23, 2021 16:04 — forked from vschlegel/solar.py
import socket
# https://www.solarmax.com/Downloads/MaxComm_Protokollbeschreibung_DE.pdf
# Communication
ip = "192.168.50.2"
port = 12345
# inverters = ("01", "02", "03")
inverters = ("01",)

Installing Python 3.7.0 on Raspbian =================================

As of July 2018, Raspbian does not yet include the latest Python release, Python 3.7.0 This means we will have to build it ourselves, and here is how to do it.

  1. Install the required build-tools (some might already be installed on your system).

@Bouni
Bouni / gist:4405ead83596aa0d8581b7abdcaa247c
Created February 4, 2018 12:49 — forked from dbrgn/gist:8243aaaa0a0e47eda094
Mikrotik RouterOS: Block DNS lookups for names containing "samsung"
/ip firewall filter add
chain=input
action=drop
comment="deny DNS resolution containing 'samsung' from SmartTV"
protocol=udp dst-port=53
content="samsung"
src-mac-address=<smartv-mac-addr>
/ip firewall filter add
chain=forward
action=drop
@Bouni
Bouni / init.vim
Created March 21, 2017 19:58 — forked from samuelb/init.vim
" ~/.config/nvim/init.vim
"
" After add / remove Plugins, run :PlugInstall / :PlugClean
if has('nvim')
let $VIMHOME = '~/.config/nvim'
else
let $VIMHOME = '~/.vim'
endif