Skip to content

Instantly share code, notes, and snippets.

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

Luke Waite lukewaite

💭
I may be slow to respond.
View GitHub Profile
@jeffehobbs
jeffehobbs / vibration_sensor_ESP32_HA_how_to.txt
Last active March 7, 2024 09:59
Vibration Sensor for ESPHome/Home Assistant
GOAL: Send a push notification after the (vibrations from the) dryer cycle has completely stopped.
USING:
* Inexpensive hardware (see below)
* ESPhome (http://esphome.io) for chip firmware
* Home Assistant (http://hass.io) for sensor state machine and push notification.
---
SHOPPING LIST:
esphome:
name: esp32_1
platform: ESP32
board: lolin32
wifi:
ssid: !secret ssid_iot
password: !secret password_iot
manual_ip:
static_ip: 192.168.0.110
@AdamNaj
AdamNaj / about.md
Last active July 13, 2022 19:50
Z Wave Graph for Home Assistant
@ThomasR
ThomasR / PowerShell.xml
Created March 21, 2016 20:23
Syntax Highlighting for PowerShell scripts in IntelliJ IDEA
<filetype binary="false" description="PowerShell" name="PowerShell">
<highlighting>
<options>
<option name="LINE_COMMENT" value="#" />
<option name="COMMENT_START" value="&lt;#" />
<option name="COMMENT_END" value="#&gt;" />
<option name="HEX_PREFIX" value="" />
<option name="NUM_POSTFIXES" value="" />
<option name="HAS_BRACES" value="true" />
<option name="HAS_BRACKETS" value="true" />
@pleckey
pleckey / cleanup.sh
Created July 15, 2013 00:35
Minimize Ubuntu vagrant box size for packaging
#!/bin/bash
##
# Run as sudo, then exit and package immediately
##
# Remove unnecessary packages
aptitude purge ri
aptitude purge installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide
aptitude purge python-dbus libnl1 python-smartpm linux-headers-2.6.32-21-generic python-twisted-core libiw30
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

{ "10500" : { "Corrective Action" : "Occurs when you have not agreed to the billing agreement.",
"Error Code" : "10500",
"Long Message" : "This transaction cannot be processed due to an invalid merchant configuration.",
"Short Message" : "Invalid Configuration"
},
"10501" : { "Corrective Action" : "Occurs when the billing agreement is disabled or inactive.",
"Error Code" : "10501",
"Long Message" : "This transaction cannot be processed due to an invalid merchant configuration.",
"Short Message" : "Invalid Configuration"
},
@bradland
bradland / ssh-known-hosts-mgmt.sh
Last active April 4, 2023 21:21
SSH known_hosts tools
# This is a short collection of tools that are useful for managing your
# known_hosts file. In this case, I'm using the '-f' flag to specify the
# global known_hosts file because I'll be adding many deploy users on this
# system. Simply omit the -f flag to operate on ~/.ssh/known_hosts
# Add entry for host
ssh-keyscan -H github.com >> /etc/ssh/ssh_known_hosts
# Scan known hosts
ssh-keygen -f /etc/ssh/ssh_known_hosts -F github.com