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/sh | |
# This file is a Startup Script for DDWRT to enable setting timelimit for a given list of MAC address | |
# Sometimes soon, I'll add the modification to have it limiting all MAC by default, and add some exclusion for | |
# Specific MAC. Modification shall not be that complex though. | |
# | |
# How it works | |
# ============ | |
# Basically, the script relies on a configuration file (which is defined within the script, because ddwrt not writable root FS). | |
# This file holds a MAC address and a list of 7 minute limit one for each of the week's day, starting on monday. | |
# On startup, and for each registered MAC address, the scripts registers an ACCEPT rule to monitor exchanged packets for the given MAC address. |
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
After a few times trying, I finally wrote a docker-compose for home assistant that does not generate wear of the device, aside from longterm configuration. | |
``` | |
version: '3' | |
services: | |
homeassistant: | |
container_name: homeassistant | |
image: "ghcr.io/home-assistant/home-assistant:stable" | |
read_only: false | |
tmpfs: |
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 | |
container=`docker-compose ps | tail -n1 | cut -f1 -d' '` | |
docker exec -it $container apt update | |
docker exec -it $container apt install -y -qq sudo | |
docker exec -it $container bash -c 'echo "gitlab-runner ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers' |
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
Dear folks, | |
TL;DR: build/rebuild the lastly built makefile | |
I'm working on a regular basis with multiple project inside sublime, and I don't quite like having a huge number of windows. | |
So the the project feature does not really fit my need for building projects. | |
Instead I came up with a really cranky bash+sublime to be able to relaunch the last built makefile without having to navigate to the makefile with the current view. | |
If anyone has a more standard way of polishing this out, I'm eager to learn! Although my sole constraint is one window, and no project context (code-skyzophrenia has some advantages :p) | |
``` |