Skip to content

Instantly share code, notes, and snippets.

View notjosh's full-sized avatar

Joshua May notjosh

View GitHub Profile
@notjosh
notjosh / somrig.yaml
Last active January 24, 2024 13:04 — forked from amorfinvdev/somrig.yaml
Ikea Somrig Remote Blueprint (Z2M) [w/ initial press]
blueprint:
name: IKEA Somrig Controls (Z2M) [w/ initial press]
description: "## Control anything with IKEA Somrig Dimmer remote (v1.0)
Only for use with Zigbee2MQTT ([MQTT](https://www.home-assistant.io/integrations/mqtt)
+ [Z2M addon](https://www.zigbee2mqtt.io/guide/installation/03_ha_addon.html)).
Adapted from https://gist.github.com/damru/b2c1c780ffb0ddc084952eb89db9573a
diff --git a/node_modules/@11ty/eleventy/src/Eleventy.js b/node_modules/@11ty/eleventy/src/Eleventy.js
index 76e3ea9..9df3a04 100644
--- a/node_modules/@11ty/eleventy/src/Eleventy.js
+++ b/node_modules/@11ty/eleventy/src/Eleventy.js
@@ -632,19 +632,20 @@ Arguments:
await this.config.events.emit("beforeWatch", queue);
await this.config.events.emit("eleventy.beforeWatch", queue);
+ this.watchTargets.clearDependencyRequireCache();
+ this.resetConfig();
@notjosh
notjosh / script.js
Last active January 29, 2021 16:59
COVID vaccination progress in Germany
'use strict';
const CONFIG = {
dataURL: 'https://rki-vaccination-data.vercel.app/api',
alsoDrawState: undefined,
};
const fetchJSON = async (url) => {
const request = new Request(url);
const data = await request.loadJSON()
@notjosh
notjosh / bridge-boot.log
Created May 25, 2020 11:03
BERG Bridge boot log
Script started on Mon May 25 12:54:57 2020
command: screen /dev/cu.usbserial-1440 115200 8N1
[?1049h[!p[?3;4l>[?1h=(BRomBOOT
Start AT91Bootstrap...
U-Boot 2012.04.01 (Sep 18 2012 - 14:24:35)
CPU: AT91SAM9G20
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 6 columns, instead of 4. in line 1.
"CSV_Reader","Parser","RST_BatchDeletePlayWeeks","RST_BatchProcess_RawCSV","RST_Batch_GetMagicMarketCapacity","ApexClass"
"RST_ForecastUpload_Trigger","RST_PlayWeek_Trigger","RST_Version_Trigger","ApexTrigger"
0000000000007590 t +[TSTableView ts_preferredStyleForStyle:]
0000000000007648 t +[TUAccessibilityAnnouncer speak:style:]
0000000000006dd5 t +[TUApplicationWorkspace shared]
0000000000004c5d t +[TUMenuBarItem separatorItem]
0000000000007db1 t +[TUMenuBarItemHandlerProviderWrapper wrapperWithTarget:provider:]
0000000000002b6c t +[TUMenuBarManager menuAvailable]
0000000000002af9 t +[TUMenuBarManager sharedInstance]
00000000000050e2 t +[TUWindowToolbarItem flexibleSpaceItem]
0000000000005029 t +[TUWindowToolbarItem shareActionItem]
000000000000597a t +[TUWindowToolbarManager shared]
@notjosh
notjosh / gist:4e3d3486777052a2afc54c3d0911633c
Created June 5, 2018 07:38
News.app, Tea.framework symbols
0000000000002aa1 t +[TSApplicationWorkspace openManageSubscriptionsSettings]
0000000000002a20 t +[TSApplicationWorkspace openNewsSystemNotificationSettings]
0000000000002b28 t +[TSSKUI fontMetricsSection1]
0000000000002b22 t +[TSSKUI presentExplictRestrictionAlertControllerFromViewController:]
U Foundation.NSNotFound.getter : Swift.Int
U dispatch thunk of Foundation.JSONDecoder.decode<A where A: Swift.Decodable>(_: A.Type, from: Foundation.Data) throws -> A
U Foundation.JSONDecoder.init() -> Foundation.JSONDecoder
U type metadata accessor for Foundation.JSONDecoder
U static Foundation.JSONEncoder.OutputFormatting.prettyPrinted.getter : Foundation.JSONEncoder.OutputFormatting
U type metadata accessor for Foundation.JSONEncoder.OutputFormatting
# Reactive Cocoa 5 crash-course
Hello, World!
##👋
I sincerely hate most RAC/RAS/FRP/WTF/BBQ (MOAR three letter acronyms is what programming needs, definitely) that start with "oh, Reactive Cocoa is a framework for working with streams of values over time" or some other similar word-soup.
If you understand it already, I'm sure it makes sense, for newcomers it's absolutely horrible and impenetrable.
<details><summary>✅ fastlane environment ✅</summary>
### Stack
| Key | Value |
| ------------------- | ------------------------------------------- |
| OS | 10.12.1 |
| Ruby | 2.3.1 |
| Bundler? | true |
| Git | git version 2.9.3 (Apple Git-75) |
#!/usr/bin/env ruby
# sigh, nokogiri :(
require 'nokogiri'
require 'open-uri'
require 'CGI'
DICTIONARY_HOME = 'https://dictionary.cambridge.org/dictionary/english/'.freeze
def fetch(url)