Skip to content

Instantly share code, notes, and snippets.

View adamlc's full-sized avatar

Adam Curtis adamlc

View GitHub Profile
@caseywatts
caseywatts / 0 README.md
Last active August 15, 2024 15:15
async/await in ember tests
@heathdutton
heathdutton / upgrade-php7.sh
Last active January 12, 2024 07:47
Upgrade PHP to 7.3 on Amazon Linux (specifically for Elastic Beanstalk but should work elsewhere)
#!/usr/bin/env bash
# Upgrade an Amazon Linux EC2 to PHP 7.3
#
# Last tested w/ PHP 7.2 AWS Linux version 2.8.5
#
# Must be ran as sudo:
# sudo bash upgrade-php7.sh
#
# Can be added to ./.ebextensions/20_php.config like so:
# container_commands:
@dglaude
dglaude / 1st_readme.txt
Last active December 2, 2025 22:04
Home Assistant Rainbow Loop with Ikea Tradfri RGB light
Please find below the various piece of code that together control my RGB light to loop in Rainbow.
Every two seconds, it change from one colour to another based on the value of the second.
So it compute 30 differents RGB value in a "circle", all with the same Saturation and Brightness both forced to 1.0
The transition from one colour to another is done in one seconds.
The name of my Tradfri RGB light bulb is "light.couleur"
A link to my video on Twitter:
https://twitter.com/DavidGlaude/status/1059596285991366657
@whatupfoo
whatupfoo / 1-orgs-archetype.md
Last active July 27, 2026 05:43
Orgs and Teams Best Practices

Organization archetypes

The intention of this document is to provide some guidance and suggestions to customers who are wondering how they should structure organizations and teams in their GitHub Enterprise environment. The idea isn't to give hard and fast rules on which approach is better than the other, but to give examples of when one approach might be preferable to another depending on the use case.

1. A single organization with direct organization membership for repository access (not teams)

          ________________
          |     Org      |
          |    ______    |
          |   |      |\  |

| | Repo | \ |

@cbenard
cbenard / backup_zigbee2mqtt.env
Created December 13, 2022 20:43
Zigbee2MQTT Automated Backup
# Requirements:
# Requires jq, base64, and unzip to be installed
MQTT_HOST=mosquitto
MQTT_USER=USERNAME_HERE
MQTT_PASSWORD=PASSWORD_HERE
MQTT_NETWORK=homeassistant_mqtt
MQTT_JSON=mqtt_output_zigbee2mqtt.json
MQTT_ZIP=zigbee2mqtt_backup.zip
@mildsunrise
mildsunrise / README.md
Last active July 27, 2026 00:51
Documentation of Tuya's weird compression scheme for IR codes

[Tuya][]'s IR blasters, like the [ZS08][], have the ability to both learn and blast generic IR codes. These IR codes are given to the user as an opaque string, like this:

A/IEiwFAAwbJAfIE8gSLIAUBiwFAC+ADAwuLAfIE8gSLAckBRx9AB0ADBskB8gTyBIsgBQGLAUALA4sB8gRAB8ADBfIEiwHJAeARLwHJAeAFAwHyBOC5LwGLAeA97wOLAfIE4RcfBYsB8gTyBEAFAYsB4AcrCYsB8gTyBIsByQHgPY8DyQHyBOAHAwHyBEAX4BVfBIsB8gTJoAMF8gSLAckB4BUvAckB4AEDBfIEiwHJAQ==

Not much is known about the format of these IR code strings, which makes it difficult to use codes obtained through other means (such as a

@kev-bi
kev-bi / workload-identity-federation.md
Created January 12, 2025 06:11
GCP service account to AWS IAM role federation for terraform aws provider

GCP service account to AWS IAM role federation for aws terraform provider

On the off chance you have GCP workloads (i.g. GCE VMs or Cloud Run services) that need to apply terraform templates to create resources in an AWS account you can do so by fetching an identity token from the metadata server and using the token for workload identity federation.

Prereqs

This assumes your Cloud Run service or GCE VM already has a service account assigned.

Steps