Skip to content

Instantly share code, notes, and snippets.

@phdelodder
phdelodder / reset_ikea_light_bulbs_using_shelly.yaml
Created October 31, 2022 14:25
Home assistant script to reset Ikea bulbs using a shelly device
alias: Reset Ikea Light Bulbs using Shelly
sequence:
- service: switch.turn_off
data: {}
target:
entity_id: switch.verlichting_slaapkamer_margot
- delay:
hours: 0
minutes: 0
seconds: 1
#!/usr/bin/env python3
#source: https://community.home-assistant.io/t/backup-snapshots-no-longer-decryptable/104048/12
import sys
import getopt
import hashlib
import tarfile
import glob
import os
#!/bin/sh
#source: https://pn.id.lv/blog/2019/08/gitea-mirroring
KEY="put your key here"
REMOTE="put your remote URL here"
##########
keyname=$(mktemp)
mkdir -p ~/backup
docker run --rm -v freshrss_db:/data -v ~/backup:/backup ubuntu bash -c “cd /data && tar cvf /backup/freshrss_db.tar .”
#!/bin/bash
timeout=5
username="admin"
password=""
motion_camera_id=1
filename="2020-11-03/23-54-29.mp4"
  • Remote login using SSH.
docker stop deconz
docker run -it --rm --entrypoint /bin/bash --privileged --cap-add=ALL -v /dev:/dev -v /lib/modules:/lib/modules -v /sys:/sys marthoc/deconz
#in case libc6 isn't installed
echo "deb http://ftp.de.debian.org/debian sid main" >> /etc/apt/sources.list
apt-get update && apt-get upgrade libc6

Now follow the part for ubuntu: https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Update-deCONZ-manually

@phdelodder
phdelodder / Run_docker_in_lxc_proxmox.md
Last active September 9, 2020 09:22
Run docker in lxc proxmox
  1. On the Proxmox host, edit /etc/modules-load.d/modules.conf to add these modules:
aufs
overlay
  1. Reboot or load the modules using modprobe:
modprobe aufs
modprobe overlay
#!/bin/bash
#install required packages:
sudo apt install git-core lintian build-essential automake autoconf libtool
sudo apt install debhelper python3-stdeb sphinx-common asciidoc-base bison flex libdw-dev libelf-dev libiberty-dev libnuma-dev libslang2-dev libssl-dev lz4 xmlto zlib1g-dev
#get the source
cd ~/src
sudo rm -rf pve-kernel
git clone git://git.proxmox.com/git/pve-kernel.git --depth 1
@phdelodder
phdelodder / gist:82b6bc634e503eb38110
Created August 12, 2014 06:18
using RAW Devices In VirtualBox VMs
#using RAW Devices In VirtualBox VMs: http://www.howtoforge.com/using-raw-devices-in-virtualbox-vms
VBoxManage internalcommands createrawvmdk -filename vm10.vmdk -rawdisk /dev/vg0/vm10
chown vbox:vbox vm10.vmdk
@phdelodder
phdelodder / remove-intel-driver.sh
Created August 5, 2014 09:54
Remove Intel Linux Graphics Driver
#source http://theclonker.de/?p=89
sudo sh -c 'echo "\nPackage: *\nPin: release a=trusty*\nPin-Priority: 1001\n\nPackage: *\nPin: origin download.01.org\nPin-Priority: -100\n" > /etc/apt/preferences.d/intel-removal'
sudo apt-get dist-upgrade
sudo rm /etc/apt/preferences.d/intel-removal
sudo rm /etc/apt/sources.list.d/intellinuxgraphics.list*
sudo apt-get update
echo "\n\n\n\n\n\n Remember to remove the i915-3.6-3.5-dkms and intel-linux-graphics-installer packages with \n\n sudo apt-get purge i915-3.6-3.5-dkms intel-linux-graphics-installer "