Skip to content

Instantly share code, notes, and snippets.

View keithchambers's full-sized avatar

Keith Chambers keithchambers

View GitHub Profile
@keithchambers
keithchambers / macvolumes.go
Last active November 17, 2024 07:33
macvolumes
// macvolumes is a tool to classify macOS volumes by their physical connectivity
// and whether they are permanently installed or removable. It distinguishes between:
// - System volumes (the macOS boot volume)
// - Fixed volumes (built-in or permanently installed drives)
// - Removable volumes (external drives that can be disconnected)
//
// The tool uses macOS's standardized disk management structures to ensure
// consistent behavior across different Mac models.
package main
@keithchambers
keithchambers / LIMITS.md
Last active March 13, 2020 16:48
LIMITS.md

Limits for Microsoft Yammer

This article describes some of the limits that apply to Yammer.

Groups

Feature Maximum limit
Number of users per Office 365 Group 100,000
@keithchambers
keithchambers / rename-dirs.sh
Last active April 27, 2019 22:28
rename-dirs.sh
#!/bin/bash
IFS=$'\n'
FOLDERS=$(find ./ -type d | grep _\(WAVs\)_)
for FOLDER in ${FOLDERS}; do
MV_FOLDER=${FOLDER//_\(WAVs\)_}
MV_FOLDER=${MV_FOLDER//_/ }
echo "mv ${FOLDER} ${MV_FOLDER} "
@keithchambers
keithchambers / EXAMPLES.MD
Last active April 20, 2018 14:43
Job v2 CLI (WIP)

Set the job queue

$ dcos config set job queue https://dcos.sf.mesosphere.io/eng/dev/queue

Add a job defintion

$ vi job-0.yaml
name: job-0
job:
@keithchambers
keithchambers / Dockerfile
Last active February 11, 2017 20:36
Zeppelin Docker
FROM alpine
ARG DIST=http://archive.apache.org/dist/zeppelin
ARG VERSION=0.7.0
ENV ZEPPELIN_HOME=/opt/zeppelin \
JAVA_HOME=/usr/lib/jvm/java-1.7-openjdk \
PATH=$PATH:/usr/lib/jvm/java-1.7-openjdk/jre/bin:/usr/lib/jvm/java-1.7-openjdk/bin
RUN apk update && \
@keithchambers
keithchambers / main.go
Last active October 12, 2015 15:56
simple go http server
package main
import (
"fmt"
"log"
"net/http"
"os"
)
func handle(writer http.ResponseWriter, request *http.Request) {
@keithchambers
keithchambers / backup-jenkins.sh
Last active December 22, 2021 23:21
backup-jenkins.sh
#!/bin/bash
set -ex
DATE="$(date +%Y%m%d%H%M%S)"
JENKINS_HOME="/var/lib/jenkins"
BACKUP="/opt/backup/${DATE}"
SOURCES="${BACKUP}/SOURCES"
SPECS="${BACKUP}/SPECS"
RPMS="${BACKUP}/RPMS"
REPO="/opt/repo/rpms"
@keithchambers
keithchambers / Dockerfile
Last active August 29, 2015 14:18
Dockerfile Java
FROM gliderlabs/alpine:3.1
ENV JAVA_HOME /usr/lib/jvm/java-1.7-openjdk
RUN apk add --update openjdk7-jre-base bash \
&& rm -rf /var/cache/apk/*
@keithchambers
keithchambers / consul-bootstrap.sh
Last active August 29, 2015 14:17
Consul check for ACL
#!/bin/bash
set -e
MASTER_TOKEN="$1"
AGENT_TOKEN="$2"
create_acl() {
curl -X PUT "http://localhost:8500/v1/acl/create?token=$MASTER_TOKEN" \
-d '{"Name": "agent_policy", "Type": "client", "Rules": "service \"\" {policy = \"write\"}"}'
}