Skip to content

Instantly share code, notes, and snippets.

View cmacrae's full-sized avatar
🌱

Calum MacRae cmacrae

🌱
View GitHub Profile
@cmacrae
cmacrae / openpgp.md
Created April 17, 2023 21:24
My Key Proof for `56A79058378443D63BD26A5DEA9EF93EF8C91290`

[Verifying my cryptographic key:openpgp4fpr:56A79058378443D63BD26A5DEA9EF93EF8C91290]

Keybase proof

I hereby claim:

  • I am cmacrae on github.
  • I am cmacrae (https://keybase.io/cmacrae) on keybase.
  • I have a public key whose fingerprint is D8AE 0115 01EE 106D 4548 DF02 5392 2D7E 54A1 4F5D

To claim this, I am signing this object:

{
"variables":
{
"sonarr_source_machine_name": "packer-sonarr-provision-{{timestamp}}",
"sonarr_source_machine_pkg": "b7ea1559-b600-ef40-afd1-8e6b8375a0de",
"sonarr_source_machine_img": "8879c758-c0da-11e6-9e4b-93e32a67e805"
},
"builders": [
diff --git a/api/agent.go b/api/agent.go
index e4466a6..2b950d0 100644
--- a/api/agent.go
+++ b/api/agent.go
@@ -63,15 +63,13 @@ type AgentCheckRegistration struct {
// AgentServiceCheck is used to create an associated
// check for a service
type AgentServiceCheck struct {
- Script string `json:",omitempty"`
- DockerContainerID string `json:",omitempty"`
diff --git a/ui.go b/ui.go
index 33c1263..62eb283 100644
--- a/ui.go
+++ b/ui.go
@@ -1,15 +1,11 @@
package cli
import (
- "bufio"
"errors"
@cmacrae
cmacrae / gist:2315fe529ee099408a1b
Last active August 29, 2015 14:12
Launch Aqua apps from dmenu
If you fancy launching Aqua apps from dmenu, you can take the following approach.
Safari (for example):
/usr/local/bin/safari:
#! /usr/bin/env bash
open -a "Safari"
Give it executable perms, and, dmenu should see it like any other binary/script in your PATH :)
@cmacrae
cmacrae / offlineimap.py
Created December 30, 2014 23:23
A more portable version of the offinleimap Python script for use with OS X's keychain
#! /usr/bin/env python
import getpass, re, subprocess
from os.path import expanduser, join
def get_keychain_pass(account=None, server=None):
params = {
'security': '/usr/bin/security',
'command': 'find-internet-password',
'user': getpass.getuser(),
'account': account,
'server': server,
@cmacrae
cmacrae / semaphore.log
Created December 9, 2014 00:25
Semaphore crash on SmartOS
Initializing
Command-line options: --verbose
Reading "Gruntfile.js" Gruntfile...OK
Registering Gruntfile tasks.
Registering "grunt-bump" local Npm module tasks.
Reading /opt/semaphore/bin/node_modules/grunt-bump/package.json...OK
Parsing /opt/semaphore/bin/node_modules/grunt-bump/package.json...OK
@cmacrae
cmacrae / alogin.sh
Last active August 29, 2015 14:07
Bash function to log into SmarOS zones using their alias. Put it in your .bashrc on in the global zone to use `alogin zonename`
alogin() {
local VM=$1
local ZONE=$(vmadm lookup alias=${VM})
/usr/sbin/zlogin $ZONE
}