Skip to content

Instantly share code, notes, and snippets.

View sylwit's full-sized avatar

Sylvain Witmeyer sylwit

View GitHub Profile
@sylwit
sylwit / circleci-sum-durations.user.js
Last active January 23, 2025 16:35
CircleCI sum durations
// ==UserScript==
// @name CircleCI sum durations
// @namespace https://sylwit.com/
// @match https://app.circleci.com/pipelines/*
// @grant none
// @version 1.1
// @author @sylwit
// @description Display the sum of durations across all workflows in a pipeline
// ==/UserScript==
@sylwit
sylwit / github-actions-sum-durations.user.js
Last active August 3, 2024 20:15
Github Actions sum durations - userscript
// ==UserScript==
// @name Github Actions sum durations
// @namespace https://sylwit.com/
// @match https://github.com/*
// @grant none
// @version 1.0
// @author @sylwit
// @description Display the sum of durations across all jobs in a workflow
// ==/UserScript==
@sylwit
sylwit / delete-workflow-runs.sh
Last active April 21, 2023 21:06
This bash script deletes all the runs from a Github Actions workflow, since you can't delete a workflow from the UI
#!/bin/bash
# Set the repository owner and name
owner="<owner>"
repo="<repo>"
# Replace <YOUR-PAT> with your actual Personal Access Token PAT
PAT="<YOUR-PAT>"
@sylwit
sylwit / deploy.yaml
Created December 8, 2021 03:48
Github workflow to deploy a static app on Backblaze
name: Build and deploy react app to Backblaze
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
@sylwit
sylwit / stateful.py
Created October 9, 2021 04:19
Stateful lambda
counter = 0
def lambda_handler(event, context):
global counter
if counter >= 5:
counter = 0
counter = counter + 1
print(counter)
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive;
echo "[*] Starting Install... [*]"
echo "[*] Upgrade installed packages to latest [*]"
echo -e "\nRunning a package upgrade...\n"
apt-get -qq update && apt-get -qq dist-upgrade -y
apt full-upgrade -y
apt-get autoclean
echo "[*] Install stuff I use all the time [*]"
@sylwit
sylwit / cloud_metadata.txt
Created May 24, 2021 13:08 — forked from BuffaloWill/cloud_metadata.txt
Cloud Metadata Dictionary useful for SSRF Testing
## IPv6 Tests
http://[::ffff:169.254.169.254]
http://[0:0:0:0:0:ffff:169.254.169.254]
## AWS
# Amazon Web Services (No Header Required)
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories
http://169.254.169.254/latest/meta-data/iam/security-credentials/dummy
http://169.254.169.254/latest/user-data
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME]
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKw9bHhJR+ZqItrsBZUWaQmEwvU4qd3L6VsZ9ShSx/sC [email protected]
@sylwit
sylwit / gist:9dd0a8e5ff419d38d3ade321e454a7a1
Created December 1, 2020 16:23
UserScript - AWS signin SAML - Name AWS account id
// ==UserScript==
// @name AWS signin SAML
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Name AWS account id
// @author sylwit <[email protected]>
// @match https://signin.aws.amazon.com/saml
// @grant none
// ==/UserScript==