This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
GIT_DIR=$HOME/projects/private_notes | |
# only do it if we have network | |
if ping -c1 -w5 -n 8.8.8.8 | grep -q '1 received'; then | |
# first fetch updates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
GIT_DIR=$HOME/projects/private_notes | |
# first fetch updates | |
git -C $GIT_DIR fetch -q origin > /dev/null | |
if [[ "x$(git -C $GIT_DIR status --porcelain)" == "x" ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
GIT_DIR=$HOME/projects/private_notes | |
git -C $GIT_DIR add -A | |
git -C $GIT_DIR commit -q -am "update from '$(hostname)' on $(date '+%Y%m%d %H:%M %Z')" > /dev/null || exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:11 | |
RUN apt-get update && apt-get install --no-install-recommends -y \ | |
curl jq tzdata coreutils bash git build-essential ca-certificates \ | |
stress-ng \ | |
zlib1g-dev libffi-dev libssl-dev libbz2-dev libncursesw5-dev libgdbm-dev liblzma-dev libsqlite3-dev tk-dev uuid-dev libreadline-dev \ | |
&& apt-get clean && rm -rf /var/lib/apt/lists/* | |
# install and set up pyenv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def default_serialize_func(o): | |
""" | |
Use like this: logging.debug(f"print this object: {json.dumps(myobject, indent=4, sort_keys=True, default=default_serialize_func)}") | |
""" | |
if hasattr(o, '__dict__'): | |
return o.__dict__ | |
return f"<could not serialize {o.__class__}>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -ex | |
SSI_DIR="$HOME/projects/ssi" | |
"$HOME/bin/bat-status-changed.sh" | |
source "$SSI_DIR/.ve/bin/activate" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import io | |
import json | |
import random | |
import sh | |
import time | |
import smtplib, ssl | |
# these are servers that are both close by and in my testing were able to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Copyright (c) 2017 Cloudera, Inc. All rights reserved. | |
set -exo pipefail | |
# Usage: ./docker.sh | |
# Usage: ./docker.sh test/test.sh | |
# Usage: INTERACTIVE=1 ./docker.sh | |
# This script invokes the docker container, does the necessary contortions to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2019 Cloudera, Inc. All rights reserved. | |
/** | |
* Uploads a new GBN | |
*/ | |
import com.cloudera.dsl.Common | |
freeStyleJob('PublishGenericGBN') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2016 Cloudera, Inc. All rights reserved. | |
// Cauldron CDH6.x Build job on all OSes. | |
// The OS list is defined in the cdh-local.mk Makefile | |
// in cdh.git, and is RH6, RH7, Debian8, SLES12, Ubuntu1604 | |
// as of last writing. | |
package cauldron | |
import com.cloudera.dsl.Common |
NewerOlder