Skip to content

Instantly share code, notes, and snippets.

View adamlc's full-sized avatar

Adam Curtis adamlc

View GitHub Profile
@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
@whatupfoo
whatupfoo / 1-orgs-archetype.md
Last active March 12, 2024 06:58
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 | \ |

@dglaude
dglaude / 1st_readme.txt
Last active April 28, 2024 12:40
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
@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:
@caseywatts
caseywatts / 0 README.md
Last active August 8, 2018 22:48
async/await in ember tests
@nojacko
nojacko / setup.sh
Last active May 16, 2017 07:19
Storj Server
#
# 1. Create Counterparty wallet: https://counterwallet.io/
# 2. Docs: https://github.com/Storj/storjshare-daemon/
# Firewall!
sudo ufw default allow;
sudo ufw enable;
sudo ufw allow 22/tcp;
sudo ufw allow 4000:4003/tcp
@jaksi
jaksi / main.go
Created December 23, 2016 17:32
Go web server
package main
import (
"bytes"
"crypto/tls"
"crypto/x509"
"fmt"
"io/ioutil"
"log"
"net/http"
@sj26
sj26 / LICENSE.md
Last active March 8, 2024 18:31
Bash retry function

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit

@csawyerYumaed
csawyerYumaed / nomad-check.py
Created October 17, 2016 16:22
after running a nomad job, check, verify and if failed, roll-back to previous build.
#!/usr/bin/env python
"""
As part of my jenkins build-pipeline, I'm having jenkins build and then deploy my services directly into nomad.
my build and deploy in jenkins looks like this:
docker build -t pdfservice:$BUILD_NUMBER .
docker tag pdfservice:$BUILD_NUMBER registry.service.consul:5000/pdfservice:$BUILD_NUMBER
docker push registry.service.consul:5000/pdfservice:$BUILD_NUMBER
docker build -t pdfservice:latest .
docker tag pdfservice:latest registry.service.consul:5000/pdfservice:latest
docker push registry.service.consul:5000/pdfservice:latest
#!/bin/bash
#
# vault-ec2-auth.sh
# Authenticates an EC2 instance to Hashicorp Vault
#
# configuration stored in environment variables in /etc/vault/client.conf
# expected configuration (defaults are selected below if none is specified):
# VAULT_ADDR = url of vault server
# VAULT_ROLE = role name to authenticate as