This script is useful if you want to download a release, specified by version number, unpack the tar file and smoke test the executable.
export RELEASE=0.0.1
export REPO_OWNER=jroehl
export REPO=go-suitesync| # needs sudo rights | |
| # https://www.digitalocean.com/community/tutorials/how-to-install-dropbox-client-as-a-service-on-ubuntu-14-04 | |
| curl -Lo dropbox-linux-x86_64.tar.gz https://www.dropbox.com/download?plat=lnx.x86_64 | |
| mkdir -p /opt/dropbox | |
| tar xzfv dropbox-linux-x86_64.tar.gz --strip 1 -C /opt/dropbox | |
| # needs user input | |
| echo "" | |
| echo "" |
| #!/bin/bash | |
| PROGNAME=$0 | |
| usage() { | |
| cat << EOF >&2 | |
| Usage: $PROGNAME [-q <quality>] [-s <scale_shortest_side>] [-s <scale_largest_side>] | |
| -q <quality>: quality of guetzli process | default [85] | |
| -l <scale>: the scale of the largest side of the image | |
| -s <scale>: the scale of the shortest side of the image |
| .PHONY: run | |
| SHELL := /bin/bash | |
| # If the first argument is "run" | |
| ifeq (run,$(firstword $(MAKECMDGOALS))) | |
| # use the rest as arguments for "run" | |
| RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) | |
| # turn them into blank targets | |
| $(eval $(RUN_ARGS):;@:) |
| #!/bin/bash | |
| # Update the nameserver of a domain with the nameservers of a specified hostedzone | |
| # aws-update-nameservers.sh HostedZoneId | |
| HOSTED_ZONE_ID=$1 | |
| RESULT=(`aws route53 get-hosted-zone --query '[DelegationSet.NameServers,HostedZone.Name]' --output text --region us-east-1 --id $HOSTED_ZONE_ID `) | |
| NAMESERVERS=("${RESULT[@]:1}") | |
| SANITIZED_NAMESERVERS=${NAMESERVERS[@]/#/Name=} |
| #! /bin/bash | |
| # Execute locally | |
| # source ./aws-assume-role.sh AccountId Role Region [LifetimeCredentials] | |
| # Execute from remote | |
| # source <(curl -sL https://gist.github.com/jroehl/c0789a3c4dca94ecf6958a9f4e408b8a/raw/aws-assume-role.sh) AccountId Role Region [SessionName] [LifetimeCredentials] | |
| if ( | |
| [[ -n $ZSH_EVAL_CONTEXT && $ZSH_EVAL_CONTEXT =~ :file$ ]] || | |
| [[ -n $KSH_VERSION && $(cd "$(dirname -- "$0")" && |
This script is useful if you want to set environment variables dynamically in circleci config.yml file. The environment variables used in this case are used for go-suitesync.
The env variable
master_NSCONF_ACCOUNTwill overwrite theNSCONF_ACCOUNTvariable - if set!
curl -sL https://gist.github.com/jroehl/30d8c212babd5414ad921a298bebec87/raw/set-circleci-env.sh | bashNeeds yq (
pip install yq) anddigto be installed
curl -s https://gist.githubusercontent.com/jroehl/25dcd6a35d5cf7809d3274439a1e6783/raw/update-ddns.sh | bash -s "host" "domain" "password"
import to require
import (.*) from (.*)[;]?$
const $1 = require($2);
export to module.exports
export ((?:async )?(?:function)*(?:class)* ([a-zA-Z0-9]+)[ ]?\([\s\S]*?\n}\n)
$1
Needs jq >= 1.5
curl -s https://gist.githubusercontent.com/jroehl/8ba7eb7280278518a52889613dcc02d3/raw/create-billing-report.sh | bash -s "--month=1 --year=2020"