Skip to content

Instantly share code, notes, and snippets.

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

Christian Romney christianromney

🏠
Working from home
View GitHub Profile
@christianromney
christianromney / datomic-system-name.sh
Last active November 20, 2019 12:26
Bash script to get the Datomic Cloud system name
#!/usr/bin/env bash
set -eo pipefail
if [[ "$#" -eq 0 ]]; then
cat <<EOF
usage: $(basename $0) <REGION> [OPTIONS]
REGION - a valid AWS region e.g. us-east-1
OPTIONS - any valid AWS CLI options e.g. --profile home
EOF
@christianromney
christianromney / counterintel.bash
Last active July 10, 2019 16:07
Who's listening on your machine?
#!/usr/bin/env bash
echo "The following programs are listening for incoming connections:"
lsof -i | grep LISTEN | awk '{print $1}' | sort | uniq | while read x; do
printf "%10s \n\t %s" "$x" (psgrep $x | sed 1d | awk '{print $11}' | sort | uniq); printf "\n\n"
done
@christianromney
christianromney / family.rkt
Created April 17, 2019 02:34
Exploring Racket's Datalog implementation
#lang datalog
% -- facts -- %
female(georgene).
female(randi).
female(nikki).
female(jenny).
female(jen).
female(taylor).
#lang racket
(define es (list 1 2 3))
(define base
(lambda (k)
(lambda (es)
'())))
(define step
(lambda (k)
Hi Christian,
Over the past few days, our reliability has not met our standard
of excellence. We are writing to apologize for any disruptions
this may have caused for you and your work. Resolving these
issues is our team’s top priority, and we are doing everything we
can to resume the level of service you expect from CircleCI.
What happened:
Hi Christian,
Over the past few days, our reliability has not met our standard
of excellence. We are writing to apologize for any disruptions
this may have caused for you and your work. Resolving these
issues is our team’s top priority, and we are doing everything we
can to resume the level of service you expect from CircleCI.
What happened:
#!/usr/bin/env bash
set -o pipefail
slow_compute_hash() {
find "$1" -type f -exec md5sum {} \; | sort -k 2 | md5sum
}
fast_compute_hash() {
find "$1" -type f -print0 | sort -z | xargs -0 md5sum | md5sum
}
#!/usr/bin/env bash
set -o pipefail
compute_hash() {
find "$1" -type f -exec md5sum {} \; | sort -k 2 | md5sum
}
PROJECT_ROOT=$(git rev-parse --show-toplevel)
echo "root: ${PROJECT_ROOT}"
#!/usr/bin/env bash
if [[ $1 = "dev" ]]; then
echo -e "\033[1;32mUsing dev environment"
sed -i '' -e 's/\$DB_TST/$DB_DEV/' .envrc
direnv allow
elif [[ $1 = "test" ]]; then
echo -e "\033[1;33mUsing test environment"
sed -i '' -e 's/\$DB_DEV/$DB_TST/' .envrc
direnv allow
else
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.mixpanel = factory());
}(this, function () { 'use strict';
var Config = {
DEBUG: false,
LIB_VERSION: '2.22.4'
};