Skip to content

Instantly share code, notes, and snippets.

View mikemackintosh's full-sized avatar
🍏
Working on the next big thing

Mike Mackintosh mikemackintosh

🍏
Working on the next big thing
View GitHub Profile
FROM alpine:3.2
MAINTAINER Mike Mackintosh <[email protected]>
RUN echo "http://dl-4.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories && \
apk add --update openvpn iptables bash git
# Setup and run OpenVPN
ADD ./contrib/openvpn/* /etc/openvpn/
# Clone Nikto and symlink
@mikemackintosh
mikemackintosh / git-pre-commit-replace-tabs.sh
Last active May 31, 2016 15:33
R.I.G.B.Y. - Tabs v Spaces
#!/usr/bin/env ruby
files_modified = `git diff-index --cached --name-only HEAD`.split(/\n/)
# expand_tabs from Stack Overflow
# -> http://stackoverflow.com/a/8900610/1431239
# This algorithm by Brian Candler ([email protected]) found on the
# org.ruby-lang.ruby-talk mailing list
# http://markmail.org/message/avdjw34ahxi447qk
# Date: 2003-5-31 13:35:09
# Subject: Re: expandtabs
package main
import (
"fmt"
"log"
"os/exec"
"strconv"
"strings"
)
package main
import (
"fmt"
"log"
"os/exec"
"strings"
)
var attributes deviceAttributes

Keybase proof

I hereby claim:

  • I am mikemackintosh on github.
  • I am loves2splug (https://keybase.io/loves2splug) on keybase.
  • I have a public key whose fingerprint is BDCB ED69 4387 1391 D492 C823 541E 10C8 3832 5322

To claim this, I am signing this object:

@mikemackintosh
mikemackintosh / chromeprofiles.go
Last active April 9, 2016 20:30
OSX Attribute
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"os/exec"
"strings"
)
@mikemackintosh
mikemackintosh / module_sensu.py
Created February 16, 2016 17:57 — forked from mzupan/module_sensu.py
sensu salt module and state. Not 100% but it creates/deletes
# -*- coding: utf-8 -*-
'''
Support for Sensu
.. note::
The functions in here are generic functions designed to work with
all sensu.
'''
import logging
import os
@mikemackintosh
mikemackintosh / pre-commit
Created January 5, 2016 17:50 — forked from saliceti/pre-commit
Git pre-commit hook to check for AWS keys
#!/usr/bin/env bash
# Install globally using https://coderwall.com/p/jp7d5q/create-a-global-git-commit-hook
# The checks are simple and can give false positives. Amend the hook in the specific repository.
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
#!/bin/bash
set -e
IMAGESIZE="990" # in Megabytes
USERNAME="bill"
PASSWORD="b0ard"
PACKAGES="wireless-tools xinit consolekit net-tools fonts-freefont-ttf ifplugd ifupdown hostname fontconfig-config fontconfig iputils-ping wpasupplicant curl binutils locales sudo openssh-server ntp usbmount patch less rsync sudo raspi-config matchbox chromium x11-xserver-utils xwit sqlite3 libnss3 vim"
PI_HOSTNAME=${PI_HOSTNAME-"dashboard${RANDOM:0:3}"}
# Print some configurations