Skip to content

Instantly share code, notes, and snippets.

View eddiewebb's full-sized avatar
🚀
Accelerating software delivery

Eddie Webbinaro eddiewebb

🚀
Accelerating software delivery
View GitHub Profile
@eddiewebb
eddiewebb / openpgp.md
Last active December 14, 2023 14:01
Keyoxide / OpenPGP Fingerprint
@eddiewebb
eddiewebb / app.py
Created January 18, 2023 12:45
high resolution Picam v3 on Pi Zero as generic IP camera
'''
Serve a single endpoint that provides imnage capture.
'''
from flask import Flask,make_response
from picamera2 import Picamera2, Preview
import io
app = Flask(__name__)
@eddiewebb
eddiewebb / readme.md
Created January 11, 2023 14:28
Jira Product Discovery Insights Contributions

Pulls Insight Contribution count from JPD

  • Container == issue, and is the ARI id formatted as <ari>/issue/<id> ari:cloud:jira:123456-7890-4681-8327-40539f3855d1:issue/129565

  • Project ID similar but using /project/ ari:cloud:jira:123456-7890-4681-8327-40539f3855d1:project/11277

Grpahql

@eddiewebb
eddiewebb / dht sensor fix.md
Created July 7, 2022 01:23
"Fix" DHT Sensor reliability on Raspberry Pi

What

A 'fix' for the notoriously poor reading issues of DHT hygrometer sensors from Python / Raspberry Pis.

Why

I've used the cheap DHT sensors on a few projects and always find the "yeah they're unreliable, just keep trying" and that sucks. How do opther devices work using these sensors? Priority.

So these process changes have, for me, worked to give my python process the realtime CPU & IO access to meet the strict timing requirements of a DHT sensor.

@eddiewebb
eddiewebb / add_metrics.sh
Created December 11, 2018 14:03
Add Custom Metrics Manually to CircleCI Server
#!/bin/bash
#
# This script is a workaround to a Replicated issue in which the configuration sections do not appear in the admin console.
# It should be run on the services box from a new/clean directory where a backup will be created.
#
if [ ! -f metrics.txt ];then
echo "Please run this script in a clean directory with a 'metrics.txt' file containing desired telegraf config"
@eddiewebb
eddiewebb / count.sh
Last active August 7, 2018 00:00
GitHub Contributor count/list by org
GH_TOKEN="1234"
ORG_NAME="some-org"
curl -H "Authorization: token ${GH_TOKEN}" https://api.github.com/orgs/${ORG_NAME}/repos | jq -r '.[].url' > /tmp/repos
rm /tmp/repos 2>/dev/null
while read REPO;do
curl -H "Authorization: token ${GH_TOKEN}" ${REPO}/contributors 2>/dev/null | jq -r '.[].login' >> /tmp/users
done < /tmp/repos
@eddiewebb
eddiewebb / sshActors.sh
Created June 28, 2018 13:29
Filter CIrcleCI build history by SSH rebuilds
#! /bin/bash
#
# This script pulls recent circleci build history, using jq to filter by ssh rebuilds, and printing the summary
# Requires `jq` and a CIRCLE_TOKEN
#
CCI_PROJECT="orgname/projectname"
@eddiewebb
eddiewebb / tags3.sh
Last active June 21, 2018 19:41
Tagging S3 Objects by path
#! /bin/bash
#
# This file will filter all s3 objects where the key/path contains a specific pattern and apply the provided tag.
# Results are split into X number of backfground processes, each tagging 1000 objects
#
BUCKET_NAME="YOURBUCKET"
function tagObjects {
@eddiewebb
eddiewebb / downloadArtifacts.sh
Last active March 18, 2022 09:50
Download CircleCI Artifacts with directory structure
#!/usr/bin/env bash
#
# Download all artitacts for given build, mimicing structure locally.
#
# Batch size is slighly misleading, as it;s only how many URLs to attempt before momentary pause
#
# Can be used on CCI builds with parallelism and will only download the files for matcing index.
#
#
USAGE="$0 username/repo 123 [bitbucket] [batch_size]"
@eddiewebb
eddiewebb / config.yml
Created May 4, 2018 17:56
CircleCI Python Cache
workflows:
version: 2
build-deploy:
jobs:
- build
version: 2
jobs:
build:
docker: