These are quick notes from making my own Formula and Tap.
gobuild.sh
#!/bin/bash
#!/bin/bash | |
out_of_bounds() { | |
local num=$1 max=$2 | |
while [ $num -gt $max ]; do | |
num=$(( $num - $max )) | |
done | |
echo $num | |
} |
use puppet | |
DROP TRIGGER IF EXISTS trg_hosts_delete; | |
DELIMITER $$ | |
CREATE TRIGGER trg_hosts_delete AFTER DELETE ON hosts | |
FOR EACH ROW BEGIN | |
# Cleanup host related data | |
DELETE FROM fact_values WHERE host_id = OLD.id; |
#!/bin/bash | |
# Root used by Docker runtime | |
ROOT="/var/lib/docker" | |
# Device for Docker root | |
#ROOT_DEV="/dev/vg_root/lv_var" | |
ROOT_DEV=$(df -T ${ROOT} | awk '/dev/ { print $1 }') | |
# Docker thinpool device |
angular | |
.module("app.filters", []) | |
.filter("booleanSearch", booleanSearch) | |
function booleanSearch() { | |
return function(rows, search, fields) { | |
if (typeof search === "undefined") { | |
return rows; | |
} |
FROM boot2docker/boot2docker | |
ENV REGISTRY docker-registry | |
ENV DOMAIN example.com | |
ENV PORT 8080 | |
# Install CA certificate | |
RUN mkdir -p $ROOTFS/etc/docker/certs.d/${REGISTRY}:${PORT} ;\ | |
mkdir -p $ROOTFS/etc/docker/certs.d/${REGISTRY}.${DOMAIN}:${PORT} | |
COPY ca.crt $ROOTFS/etc/docker/certs.d/${REGISTRY}:${PORT}/ca.crt |
#/bin/bash | |
URL="https://api.github.com" | |
AUTH="Authorization: token $(cat ~/.ghtoken)" | |
curl -s -H "${AUTH}" "${URL}/orgs/IndependentIP/members?page=1&per_page=1000" >users.json | |
echo "login,site_admin,name,email" | |
for u in $(jq -r '.[] | "\(.login),\(.site_admin),\(.url)"' users.json); do | |
curl -s -H "$AUTH" "${u##*,}" | jq -r ". | \"${u%,*},\(.name),\(.email)\"" |
#!/bin/bash | |
set -eu | |
error() { | |
local msg="$1" | |
echo $msg >&2 | |
exit 1 | |
} |
#!/bin/bash | |
set -eu | |
reg="registry.hub.docker.com" | |
repo="gliderlabs" | |
image="alpine" | |
name="${repo}/${image}" | |
tag="latest" | |
parallel=4 |