Skip to content

Instantly share code, notes, and snippets.

View clrung's full-sized avatar

Christopher Rung clrung

View GitHub Profile
@clrung
clrung / halconfig.py
Created October 26, 2020 21:18
Eases pain of sharing halconfig with teammates by syncing local version with AWS S3 and Secrets Manager
#!/usr/bin/env python3
import argparse
import base64
import boto3
import datetime
import distutils.dir_util
import json
import os
import re
@clrung
clrung / clone_all_repos.sh
Last active December 11, 2023 14:34
Clones all repos in a GitHub organization
#!/bin/bash
# Usage: clone_all_repos.sh [organization] <output directory>
ORG=$1
PER_PAGE=100
GIT_OUTPUT_DIRECTORY=${2:-"/tmp/${ORG}_repos"}
if [ -z "$GITHUB_TOKEN" ]; then
echo -e "Variable GITHUB_TOKEN isn't set! Please specify your GitHub token.\n\nMore info: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/"
exit 1
kind: Secret
apiVersion: v1
metadata:
name: upbot
data:
slack_token: U3VwM3IkZWNyZTd0MGtlbgo=
kind: Secret
apiVersion: v1
metadata:
name: upbot
data:
slack_token: U3VwM3IkZWNyZTd0MGtlbgo=
kind: Secret
apiVersion: v1
metadata:
name: upbot
data:
slack_token: $((slack_token|base64))

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

#!groovy
import groovy.json.JsonOutput
import java.util.Optional
import hudson.tasks.test.AbstractTestResultAction
import hudson.model.Actionable
import hudson.tasks.junit.CaseResult
def speedUp = '--configure-on-demand --daemon --parallel'
def nebulaReleaseScope = (env.GIT_BRANCH == 'origin/master') ? '' : "-Prelease.scope=patch"
@clrung
clrung / tail_log_until_string_found.sh
Created March 23, 2017 13:12
Tails a log until a string is found
#!/bin/bash
# Date: 12/28/2016
# Author: Christopher Rung
# Description: Tails a log until a (case-insensitive) string is found
# Usage: ./tail_log_until_string_found.sh [host] [log file] [search term] [timeout]
# Example: ./tail_log_until_string_found.sh server /var/log/clrung/application.log "finished" 5m
# Exit codes: 0: successful; the search term was found in the log within the specified timeout
# 1: unsuccessful; the search term was not found in the log within the specified timeout
HOST=$1
@clrung
clrung / jekyll.conf
Created April 6, 2016 18:49
Service to generate jekyll sites
description "Jekyll"
author "Christopher Rung<clrung@gmail.com>"
# adapted from https://gist.github.com/hazanjon/8725263#file-jekyll-conf
env SITENAME=[site name here-just used for log name; I used christopherrung.com]
env SOURCE=[Jekyll source directory; I used /home/clrung/Dropbox/website]
env SITEDIR=[output directory here; I used /var/www/christopherrung.com/]
env JEKYLL=/usr/local/bin/jekyll
#Make sure mounting is completed before starting