Skip to content

Instantly share code, notes, and snippets.

View masteinhauser's full-sized avatar

Myles Steinhauser masteinhauser

View GitHub Profile
@flaviut
flaviut / Setting up Emporia Vue 2 with ESPHome.md
Last active August 22, 2024 18:14
Setting up Emporia Vue 2 with ESPHome
@noamsdahan
noamsdahan / passrole_actions_and_parameters.csv
Last active April 19, 2024 05:54
A list of IAM actions which require iam:PassRole as of December 2020. Nested parameters are written with dot ('.') notation. Where there are multiple relevant parameters, they are separated by the pipe character ('|'). consult the AWS documentation on special cases - noted with an asterisk (most of them are "array of documents" type parameters).…
IAM Permission Params
amplify:CreateApp iamServiceRoleArn
amplify:UpdateApp iamServiceRoleArn
appconfig:CreateConfigurationProfile RetrievalRoleArn
appconfig:UpdateConfigurationProfile RetrievalRoleArn
appflow:CreateConnectorProfile connectorProfileConfig.connectorProfileProperties.Redshift.roleArn
appflow:UpdateConnectorProfile connectorProfileConfig.connectorProfileProperties.Redshift.roleArn
application-autoscaling:RegisterScalableTarget RoleARN
apprunner:CreateService SourceConfiguration.AuthenticationConfiguration.AccessRoleArn|InstanceConfiguration.InstanceRoleArn
apprunner:UpdateService SourceConfiguration.AuthenticationConfiguration.AccessRoleArn|InstanceConfiguration.InstanceRoleArn
@ejlp12
ejlp12 / 1_ecs_note.md
Last active March 17, 2025 07:24
ECS Best Practices Notes
@jhutchings
jhutchings / fah_babysitter.py
Last active November 4, 2022 15:04
Folding at Home Babysitter - Original Code @danielocdh
#!/usr/bin/python3
# 1.0 - Original Code Belongs to @danielocdh
# 1.1 - Added ability to check FAH Control APIs on other ports
# 1.2 - Added support for Linux Control API (Slight changes in response checks)
# 1.3 - Fix for latest version of FAH Control API and Client (7.6.9)
# 1.4 - Added @danielocdh's feedback and his local changes around !# and spacing in the substitution
# 1.5 - @danielocdh updated expected result for authentication issues
# 1.6 - Removed un-needed tEnd references to end of readResult
# 1.7 - Added getting started
# 1.8 - Added "hacky" check to see if there is a new version of the gist using github rest api
@Coldsp33d
Coldsp33d / iter_vs_vec_benchmark.py
Last active November 8, 2024 13:59
Comparing iteration and vectorisation with a simple example
import perfplot
import pandas as pd
def vec(df):
return df['A'] + df['B']
def vec_numpy(df):
return df['A'].to_numpy() + df['B'].to_numpy()
def list_comp(df):
@rbtr
rbtr / kubectl get nodes --by-age
Created August 27, 2018 16:10
sort kubernetes nodes by age
kubectl get nodes --sort-by=".status.conditions[?(@.reason == 'KubeletReady' )].lastTransitionTime"
@lesovsky
lesovsky / fn_upgrade_partitioning.sql
Created November 13, 2017 13:04
Upgrading old partitioning with ALTER TABLEs and PLPGSQL.
-- Upgrading old partitioning with ALTER TABLEs and PLPGSQL.
-- IN: _orig_table - master table which should be upgraded
-- IN: _partkey - column which used as partition key
-- IN: _seq_col - sequence column
CREATE OR REPLACE FUNCTION fn_upgrade_partitioning(_orig_table text, _partkey text, _seq_col text) RETURNS void AS
$function$
DECLARE
_new_table text = _orig_table ||'_new'; -- parent relation's name
_child_table text; -- child relation's name
_v_from timestamp without time zone;
@JoeyG1973
JoeyG1973 / aws_saml.py
Last active September 9, 2023 10:15
aws saml login with session that auto refreshes.
# Took this:
# https://s3.amazonaws.com/awsiammedia/public/sample/SAMLAPICLIADFS/samlapi_formauth_adfs3.py
# converted to boto3 and smooshed it together with this:
# https://gist.github.com/kapilt/ac8e222081f63ba64e93
# which gave birth too this:
import sys
import botocore
import boto3
import requests
@kitschysynq
kitschysynq / gist:867caebec581cee4c44c764b4dd2bde7
Created April 10, 2017 13:45
List running qemu instances with nicely formatted output
ps -ef | awk -e '/qemu/ && !/awk/' | sed -e 's/[^/]*//' -e 's/ -/\n\t-/g'