Skip to content

Instantly share code, notes, and snippets.

View aaclarker's full-sized avatar

aaron aaclarker

  • San Francisco
View GitHub Profile
#!/usr/bin/env bash
# Setup host config in ~/.ssh/config
# Set the SYNCWATCH_* environment variables
# Run frequently, such as via cron `*/15 * * * * syncwatch.sh`
if [ -f ~/.config/plexbox ]; then
# shellcheck disable=SC1090
source ~/.config/plexbox
fi
choice = "y"
while choice.lower() == "y":
number = int(input("Enter a number to calculate factorial: "))
result = 1
for i in range(1, number + 1):
# Factorial = 1 x 2 x 3 x ... x n
result *= i
@aaclarker
aaclarker / jenkins_pipeline_timer_flag.groovy
Last active June 17, 2024 19:49
Check if Jenkins build was started by timer (Declarative Pipeline)
def started_by_timer = currentBuild.getBuildCauses()[0]["shortDescription"].matches("Started by timer")

Keybase proof

I hereby claim:

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am aaclarker on github.
  • I am aaclarker (https://keybase.io/aaclarker) on keybase.
  • I have a public key ASDsggP8gqXRpJRi4eV29mEm_7nNGpio8aoT8ncf9H6nuAo

To claim this, I am signing this object: