Skip to content

Instantly share code, notes, and snippets.

View longsleep's full-sized avatar

Simon Eisenmann longsleep

View GitHub Profile
@longsleep
longsleep / lambda_function.py
Created November 14, 2021 15:14 — 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
@longsleep
longsleep / commit-message-convention.md
Created December 4, 2020 09:54 — forked from julienbourdeau/commit-message-convention.md
The seven rules of a great git commit message

Source: http://chris.beams.io/posts/git-commit/#seven-rules

  1. Separate subject from body with a blank line
  2. Limit the subject line to 50 characters
  3. Capitalize the subject line
  4. Do not end the subject line with a period
  5. Use the imperative mood in the subject line
  6. Wrap the body at 72 characters
  7. Use the body to explain what and why vs. how
@longsleep
longsleep / .gitignore
Last active June 27, 2023 08:25
The run-lego.sh
/.env
/.lego
/*-hook*
/hooks
/lego
Verifying my Blockstack ID is secured with the address 16xbSf7QswHhVWw4Uv52689eQxcuMc5RQf https://explorer.blockstack.org/address/16xbSf7QswHhVWw4Uv52689eQxcuMc5RQf
/*
sudo apt-get install libnl-genl-3-dev
gcc debug-nl80211.c $(pkg-config --cflags --libs libnl-genl-3.0) -o debug-nl80211
*/
#include <errno.h>
#include <netlink/netlink.h>
#include <netlink/genl/ctrl.h>
#include <netlink/genl/genl.h>
#include <linux/nl80211.h>
@longsleep
longsleep / pine64-gpio-number.py
Last active December 7, 2022 22:24
Simple helper to compute sysfs GPIO numbers from PIN names on Pine64
#!/usr/bin/python3
import sys
import string
def convert(value):
value = value.upper()
alp = value[1]
idx = string.ascii_uppercase.index(alp)
num = int(value[2:], 10)

Keybase proof

I hereby claim:

  • I am longsleep on github.
  • I am longsleep (https://keybase.io/longsleep) on keybase.
  • I have a public key ASDJQYokOXCN8saoPoWzZboM9NSVYaJk-L2vHbPp1r4nbAo

To claim this, I am signing this object: