Skip to content

Instantly share code, notes, and snippets.

View flybd5's full-sized avatar
💭
Dividing by zero.

Juan Jimenez flybd5

💭
Dividing by zero.
View GitHub Profile
#include "BluetoothSerial.h"
// This code will implement a morse code keyer using bluetooth.
// It requires an Arduino device and a relay (can be mechanical or solid state).
// I used an ESP32 DevBoard and a simple 5v relay.
// The relay is powered from the Arduino. It is set as normally open. The
// trigger comes from one of the pio pins. On the relay you connect the NO
// and center contacts to a 1/4" male plug and connect that to the CW key
// jack on your radio. That's it.

Keybase proof

I hereby claim:

  • I am flybd5 on github.
  • I am jjimenez (https://keybase.io/jjimenez) on keybase.
  • I have a public key ASDpp2-xiwuJNWb453-DNWrrcv8MXppoWM4jqhYeyOAkfQo

To claim this, I am signing this object:

@flybd5
flybd5 / rancher_aws_ecr_secret.md
Created June 22, 2021 22:14
Creating and updating AWS ECR docker-registry secrets in Rancher

The easiest way to create and update a docker-registry secret in Rancher 2.x for an AWS ECR repo is to set up a CRON job that uses the AWS CLI and Kubectl.

  • Log into the host machine where the cluster is running
  • Install AWS CLI and configure it to use an IAM role that can read the ECR credentials.
  • Test the CLI config using this command: aws ecr --region <your_ecr's_region> get-login-password
  • Install kubectl and configure it with the yaml for the cluster in which you want to define the secret
  • Create a shell script like this:
# Delete the secret if it already exists (there is no way to update it)
@flybd5
flybd5 / gist:1561fd7a3cd0f2d1e76c5f8bd3278765
Last active November 2, 2019 22:50
List all service tag id's in Azure
az network list-service-tags --location [azure_region] --query values[*].id
@flybd5
flybd5 / gist:df6c3a0385d022a101c5d3244e5d941c
Created September 3, 2018 08:08
Query user's Github gists to find out if a new one has been created.
#!/usr/local/bin/python
from __future__ import print_function
# gistquery is a utility to query a single user's GitHub gists
#
# Syntax:
#
# gistquery <username>
#