Skip to content

Instantly share code, notes, and snippets.

View frgmt's full-sized avatar
🏠
Working from home

fragment frgmt

🏠
Working from home
View GitHub Profile
@sat0yu
sat0yu / code.gs
Last active May 5, 2022 04:21
CreateGithubIssueFromGoogleFormResponse
function onFormSubmit(e) {
const headers = {
outline: "Outline",
expected: "What's the expected result?",
actual: "What's the actual result?",
howToReproduce: "Steps to reproduce the issue",
details: "Additional details",
email: "Email Address",
};
const title = e.namedValues[headers.outline][0];
@guzmanbraso
guzmanbraso / rd-clean-older-reports.sh
Last active December 21, 2021 07:31
Clean rundeck executions logs older than a given amount of days but keep a minimum amount of executions per job.
#!/bin/bash
# This script will clean executions older than a given amount of days ($DAYS) but will keep at least $KEEP executions.
# Based on @unicolet gist that keeps last 30 exec of each job ( https://gist.github.com/unicolet/af648a97163ce6b44645 )
# Taken from @lucabusin the workflow tables cleaning code ( https://gist.github.com/lucabusin/cad36a45764f2fc2e2daa81e2db4186d )
# setup ~/.mycnf or ~/.pgpass to allow passwordless connection to mysql/postgres
# Comment / Uncomment below to use postgres or mysql.
# Days to keep executions.
DAYS=90
# Minimum Amount to Keep