source "https://rubygems.org"
gem "knife-solo"
gem "berkshelf"
This file contains hidden or 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
<?php | |
// Request URL | |
$url = 'http://www.google.com/'; | |
// HTTP headers | |
$headers = array( | |
//'Content-Type: application/json', | |
//'Accept: application/json', | |
); |
This file contains hidden or 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 -e | |
# JAVA_HOME can be passed as argument if not set | |
if [ ! -d $JAVA_HOME ]; then | |
JAVA_HOME=${1} | |
fi | |
KEYSTORE=$JAVA_HOME/jre/lib/security/cacerts | |
if [ ! -f "$KEYSTORE" ]; then | |
echo "Keystore not found in '$KEYSTORE'" | |
exit 1 |
This file contains hidden or 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 | |
# Inspired on https://david-kerwick.github.io/2017-01-04-combining-zsh-history-files/ | |
set -e | |
history1=$1 | |
history2=$2 | |
merged=$3 | |
echo "Merging history files: $history1 + $history2" | |
test ! -f $history1 && echo "File $history1 not found" && exit 1 |
Below are my build instructions for GnuPG 2.2.20, released on April 1st, 2020. These instructions are built for a headless Centos 7 LTS server (specificaly the offical centos docker image https://hub.docker.com/_/centos).
You use the below install script to install GnuPG 2.2.x by running the following commands:
# if you are root in a docker image:
curl -OL "https://gist.githubusercontent.com/MirkoManojlovic/56f563271eca43c67606b5991f32edd4/raw/1358b87214312e41fd2e28a49a34869a699fb06f/install-gnupg22.sh" && bash ./install-gnupg22.sh
# else if you need to sudo to do the installs:
Create a Synthetic Record for Dynamic DNS. Copy the script and substitute your synthetic record's username, password, and FQDN in the config section.
Go to Administration > Commands tab and paste the code into the Command box, then click Save Custom Script.
Go to Administration > Management tab. Scroll down to the Cron section, and toggle Cron: Enable
In the Additional Cron Scripts section, put:
This file contains hidden or 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 -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
This file contains hidden or 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
# attempting to be the most robust solution for outputting git log as JSON, | |
# using only `git` and the standard shell functions, without requiring | |
# additional software. | |
# - uses traditional JSON camelCase | |
# - includes every major field that git log can output, including the body | |
# - proper sections for author, committer, and signature | |
# - multiple date formats (one for reading, ISO for parsing) | |
# - should properly handle (most? all?) body values, even those that contain | |
# quotation marks and escaped characters |