Skip to content

Instantly share code, notes, and snippets.

@NonaSuomy
NonaSuomy / lambda_function.py
Created October 2, 2023 18:46 — forked from matt2005/lambda_function.py
Alexa Smart Home Skill Adapter for Home Assistant
"""
Copyright 2019 Jason Hu <awaregit at gmail.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@NonaSuomy
NonaSuomy / lambda_function.py
Created October 2, 2023 18:46 — forked from matt2005/lambda_function.py
Alexa Smart Home Skill Adapter for Home Assistant
"""
Copyright 2019 Jason Hu <awaregit at gmail.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
// Must disable logging if using logging in main.cpp or in other custom components for the
// __c causes a section type conflict with __c thingy
// you can enable logging and use it if you enable this in logger:
/*
logger:
level: DEBUG
esp8266_store_log_strings_in_flash: False
*/
//#define APE_LOGGING
@NonaSuomy
NonaSuomy / chio-bacula
Created July 14, 2017 17:04 — forked from Stefan-Code/chio-bacula
Script for Bacula autochanger barcode handling on FreeBSD
#!/bin/sh
#
# Bacula interface to FreeBSD chio autoloader command with
# multiple drive support
# (By Lars K�ller, lars+bacula@koellers.net, 2004)
#
# If you set in your Device resource
#
# Changer Command = "path-to-this-script/chio-bacula" %c %o %S %a
# you will have the following input to this script:
@NonaSuomy
NonaSuomy / gist:a62a9a125d61fc5df748066961702ac6
Created June 30, 2017 01:01 — forked from anonymous/gist:8b4a0101f5101f756bb9
Get OAUTH2.0 access token for Google Voice with a shell-script
#!/bin/bash
##
## Authenticate with Google Voice
##
USAGE="`basename $0` {auth|refresh|token} ctx"
CTX_DIR=$HOME/.gvauth
CLIENT_ID="YOUR_CLIENTID_FROM_GOOGLE_DEVELOPER_CONSOLE"
CLIENT_SECRET="YOUR_CLIENTSECRET_FROM_GOOGLE_DEVELOPER_CONSOLE"
SCOPE="https://www.googleapis.com/auth/googletalk%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile"
@NonaSuomy
NonaSuomy / vm-backup.sh
Created June 13, 2017 05:16 — forked from cabal95/vm-backup.sh
I use this script to backup my QEMU/KVM/libVirt virtual machines. The script requires KVM 2.1+ since it uses the live blockcommit mode. This means the data in the snapshot disk is rolled back into the original instead of the other way around. Script does NOT handle spaces in paths.
#!/bin/bash
#
BACKUPDEST="$1"
DOMAIN="$2"
MAXBACKUPS="$3"
if [ -z "$BACKUPDEST" -o -z "$DOMAIN" ]; then
echo "Usage: ./vm-backup <backup-folder> <domain> [max-backups]"
exit 1