Skip to content

Instantly share code, notes, and snippets.

View andrewhoff's full-sized avatar

Andrew Hoff andrewhoff

View GitHub Profile
@andrewhoff
andrewhoff / Makefile.gobuild
Created March 3, 2017 04:01
Basic go app makefile
bin_name = $(notdir $(CURDIR))
all: clean build
clean:
rm -f ./$(bin_name)
build:
go build .
@andrewhoff
andrewhoff / Ubiquiti Unifi UAP network config
Last active December 9, 2015 20:02
base network config for Unifi UAP (/etc/config/network)
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd66:64f9:30cd::/48'
config interface 'lan'
@andrewhoff
andrewhoff / Ubiquiti Unifi UAP
Last active September 29, 2016 06:51
Ubiquiti Unifi UAP - example uboot output
U-Boot unifi-v1.5.2.206-g44e4c8bc (Aug 29 2014 - 18:01:57)
DRAM: 64 MB
Flash: 8 MB
8
U-Boot unifi-v1.5.2.206-g44e4c8bc (Aug 29 2014 - 18:01:57)
DRAM: 64 MB
Flash: 8 MB
#!/bin/bash
# Prerequisites
# Install Xcode (https://itunes.apple.com/au/app/xcode/id497799835?mt=12)
# Get CLI Tools xcode-select --install
# Setup brew
# ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
@andrewhoff
andrewhoff / UAPFailsafeBootSequence1407
Created November 30, 2015 18:58
How to get into Unifi UAP failsafe mode (running OpenWrt 14.07)
Set Host Machine Static IP -> 192.168.1.2 (SNM 255.255.255.0)
Disconnect POE/LAN cable from UAP
Reconnect POE/LAN cable to UAP
Watch for ~500ms green led blink
Click reset button once, green led blinks ~150ms
`telnet 192.168.1.1` from host machine
mount_root to fix config
@andrewhoff
andrewhoff / elasticsearch.yml
Last active November 18, 2015 16:10
Default Elasticsearch Configuration
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please see the documentation for further information on configuration options:
@andrewhoff
andrewhoff / archerc9gpio.txt
Created August 14, 2015 20:29
TP-Link Archer C9 Ver 1.0 GPIO Mapping
GPIO Pin Effect
1 up ------------ LAN LED ON
1 down ---------- LAN LED OFF
2 up ------------ Refresh LED ON
2 down ---------- Refresh LED OFF
3 up ------------ NVRAM RESET!
4 up ------------ b/g/n Radio LED ON
4 down ---------- b/g/n Radio LED OFF
5 up ------------ a/c Radio LED ON
5 down ---------- a/c Radio LED OFF