Skip to content

Instantly share code, notes, and snippets.

View gyoza's full-sized avatar
💭
Kuuru the bestest doggo - RIP 2009-2018

Jon gyoza

💭
Kuuru the bestest doggo - RIP 2009-2018
  • Some Artificial Intelligence Company.
  • colorado, us
View GitHub Profile
@gyoza
gyoza / ec2list.py
Last active October 9, 2019 00:03
paginate ec2 with ability to filter by tag name and value
#!/usr/bin/env python3
import os
import re
import sys
import time
import math
import json
import boto
import boto3
import random
@gyoza
gyoza / centos7_timechine.sh
Created April 10, 2020 15:33 — forked from darcyliu/centos7_timechine.sh
Install Time Machine service on CentOS 7
# Install Time Machine service on CentOS 7
# http://netatalk.sourceforge.net/wiki/index.php/Netatalk_3.1.7_SRPM_for_Fedora_and_CentOS
# http://confoundedtech.blogspot.com/2011/07/draft-draft-ubuntu-as-apple-time.html
yum install -y rpm-build gcc make wget
# install netatalk
yum install -y avahi-devel cracklib-devel dbus-devel dbus-glib-devel libacl-devel libattr-devel libdb-devel libevent-devel libgcrypt-devel krb5-devel mysql-devel openldap-devel openssl-devel pam-devel quota-devel systemtap-sdt-devel tcp_wrappers-devel libtdb-devel tracker-devel
yum install -y bison docbook-style-xsl flex dconf
@gyoza
gyoza / clean_actions.sh
Created October 20, 2022 16:26
delete all github workflow action runs.. Can require multiple runs if you have thousands of actions.
#!/bin/bash
OWNER=org
REPO=therepo
#GET DAT SHIZ
WORKFLOW_ID=$(gh workflow list|rev|cut -f 1|rev)
#DELETE DAT SHIZ
for i in ${WORKFLOW_ID[@]}; do
gh api -X GET /repos/$OWNER/$REPO/actions/workflows/$i/runs | jq '.workflow_runs[] | .id'
gh api -X GET /repos/$OWNER/$REPO/actions/workflows/$i/runs | jq '.workflow_runs[] | .id' | xargs -I{} gh api -X DELETE /repos/$OWNER/$REPO/actions/runs/{}
@gyoza
gyoza / sequence.yaml
Created January 28, 2023 22:14
home-automation script: check outside humidity and turn on fresh_air fan
sequence:
- if:
- condition: template
value_template: >-
{{
int(states('sensor.openweathermap_humidity')|regex_replace(find='%',
replace='', ignorecase=False)) > 25}}
- condition: template
value_template: >-
{{