Skip to content

Instantly share code, notes, and snippets.

View penguinpowernz's full-sized avatar

Robert penguinpowernz

  • Penguin Power
  • Auckland, New Zealand
View GitHub Profile
package main
import (
"fmt"
"log"
"time"
"github.com/ashwanthkumar/slack-go-webhook"
"github.com/autogrow/go-jelly/ig"
)

Keybase proof

I hereby claim:

  • I am penguinpowernz on github.
  • I am mcleodr (https://keybase.io/mcleodr) on keybase.
  • I have a public key ASA_0KLhZhVGNBqQsfHZbL5uviW4hekKGx9bYtw5yH0kKAo

To claim this, I am signing this object:

@penguinpowernz
penguinpowernz / jsonpp.go
Last active December 12, 2017 00:37
Pretty print JSON files faster than json_pp
// build by running go build ./jsonpp.go
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"os"
@penguinpowernz
penguinpowernz / index.html
Created February 15, 2017 23:11
Camera streaming proxy so you can block your botnettable camera at the firewall and serve this through your own NGINX
<html>
<head>
<title>Safe Cam!</title>
<meta http-equiv="refresh" content="60"/>
</head>
<body style="padding: 0px; margin: 0px;">
<img id="MJPEG_streaming" src="http://<camip>/snapshot.cgi" align="CENTER">
<script type="text/javascript">
stretchImage = function() {
var image = document.getElementById("MJPEG_streaming");
@penguinpowernz
penguinpowernz / KaikouraQuake.kml
Created November 17, 2016 13:31
Kaikoura Quake photos located in Google Maps/Earth
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>KairouraQuake.kml</name>
<Style id="s_ylw-pushpin">
<IconStyle>
<scale>1.1</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
</Icon>
@penguinpowernz
penguinpowernz / wpa_supplicant.conf
Created October 28, 2016 00:06
WPA Supplicant config file explanations
##### Example wpa_supplicant configuration file ###############################
#
# This file describes configuration file format and lists all available option.
# Please also take a look at simpler configuration examples in 'examples'
# subdirectory.
#
# Empty lines and lines starting with # are ignored
# NOTE! This file may contain password information and should probably be made
# readable only by root user on multiuser systems.
@penguinpowernz
penguinpowernz / README.md
Last active May 20, 2025 10:09
WPA CLI commands
command args description
status [verbose] get current WPA/EAPOL/EAP status
ifname get current interface name
ping pings wpa_supplicant
relog re-open log-file (allow rolling logs)
note <text> add a note to wpa_supplicant debug log
mib get MIB variables (dot1x, dot11)
help [command] show usage help
interface [ifname] show interfaces/select interface
@penguinpowernz
penguinpowernz / servaphore.go
Last active October 19, 2016 11:43
Semaphore server
package main
import (
"log"
"net/http"
"time"
)
type empty struct{}
type semaphore chan empty
FROM node:argon
# change this to uncache and rebuilt the image
ENV DOCKERFILE_VERSION=0.0.1
RUN mkdir -p /usr/src/app
RUN npm install -g strongloop pm2
# install debian packages
RUN apt-get update
@penguinpowernz
penguinpowernz / extn_count.md
Last active July 4, 2016 22:17
Standard Strongloop API node modules contents

Count of Files by Extension

This command generated this:

$ ls -lR|grep -vP "^total"|grep -vP "^./|^$|^d"|awk '{print $9}'|awk -F. '{print $NF}'|sort|uniq -c

It is not completely accurate but gives an idea.

    219 (NO EXTENSION)