Skip to content

Instantly share code, notes, and snippets.

View andras-tim's full-sized avatar
💭
I may be slow to respond.

Andras Tim andras-tim

💭
I may be slow to respond.
View GitHub Profile
@wpbrown
wpbrown / user-data.yaml
Created June 15, 2020 22:42
ubuntu autoinstall with btrfs subvolumes
#cloud-config
autoinstall:
version: 1
identity:
hostname: btrbox
password: "$6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0"
username: ubuntu
storage:
config:
### drive
@fodi666
fodi666 / ZMNHHDx.xml
Created December 27, 2019 23:54
Qubino Mini Dimmer ZMNHHDx OZW 1.4
<?xml version="1.0" encoding="utf-8"?>
<Product xmlns='http://code.google.com/p/open-zwave/'>
<!--
Qubino: ZMNHHDx Mini Dimmer Z-Wave+
https://products.z-wavealliance.org/products/3381
-->
<!-- Configuration -->
<CommandClass id="112">
<Value genre="config" index="1" instance="1" label="In-wall Switch Type for Load to control I1" max="1" min="0" size="1" type="list" value="0">
<Help>With this parameter, you can select between push-button (momentary) and on/off toggle switch types.</Help>
@grisu48
grisu48 / create_vm_snapshot.sh
Last active September 23, 2020 07:56
Shell script to stop KVM, create BTRFS snapshot and restart KVM machines again
#!/bin/bash
# Shell script to stop all KVM instances, create a BTRFS snapshot (read-only) and restart the stopped KVM instances
# https://gist.github.com/grisu48/535c27cd25c096248ce234ad81abf1b9
## Configuration ##############################################################
IMGDIR="/mnt/RAID/libvirt/images"
SNAPDIR="/mnt/RAID/libvirt/snapshots"
# timeout in seconds
TIMEOUT=300
@AdamNaj
AdamNaj / about.md
Last active March 12, 2025 21:47
Z Wave Graph for Home Assistant
@lowjoel
lowjoel / sleepbot-migrate-to-sleep_as_android.rb
Last active July 13, 2019 10:57
Migrates SleepBot data to Sleep as Android's format
require 'csv'
# Parses CSV-exported data from SleepBot
def parse_export(row)
# Parse the wake up date
date_to = row[0].split('/')
date_to = Time.new(2000 + date_to[2].to_i, date_to[1], date_to[0])
# Parse the wake up/sleep times
time_from = row[1].split(':')
@aras-p
aras-p / preprocessor_fun.h
Last active April 7, 2025 13:38
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@haschek
haschek / .jshintrc
Created May 4, 2012 16:08
JSHint Configuration, Strict Edition
{
// --------------------------------------------------------------------
// JSHint Configuration, Strict Edition
// --------------------------------------------------------------------
//
// This is a options template for [JSHint][1], using [JSHint example][2]
// and [Ory Band's example][3] as basis and setting config values to
// be most strict:
//
// * set all enforcing options to true