Skip to content

Instantly share code, notes, and snippets.

Robert McLeod penguinpowernz

  • Penguin Power
  • Auckland, New Zealand
Block or report user

Report or block penguinpowernz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View updated.json
{
"type": "update",
"quake": {
"publicID": "2020p203673",
"time": "2020-03-16T08:37:10.376Z",
"depth": 23.87388039,
"magnitude": 1.222926187,
"locality": "10 km north-east of Matawai",
"mmi": -1,
"quality": "best",
View new.json
{
"type": "new",
"quake": {
"publicID": "2020p203673",
"time": "2020-03-16T08:37:10.376Z",
"depth": 10.83877039,
"magnitude": 1.021546187,
"locality": "10 km north-east of Matawai",
"mmi": -1,
"quality": "preliminary",
View lsb.sh
#!/bin/bash
lsb_release -a|grep stretch || exit 0;
apt-get update
apt-get install asl-agent
@penguinpowernz
penguinpowernz / .codeclimate.yml
Last active May 29, 2019
Golang project codeclimate config
View .codeclimate.yml
version: "2"
plugins:
govet:
enabled: true
golint:
enabled: true
gofmt:
enabled: true
FIXME:
enabled: true
View slack_notify.go
package main
import (
"fmt"
"log"
"time"
"github.com/ashwanthkumar/slack-go-webhook"
"github.com/autogrow/go-jelly/ig"
)
View keybase.md

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 Dec 12, 2017
Pretty print JSON files faster than json_pp
View jsonpp.go
// build by running go build ./jsonpp.go
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"os"
@penguinpowernz
penguinpowernz / index.html
Created Feb 15, 2017
Camera streaming proxy so you can block your botnettable camera at the firewall and serve this through your own NGINX
View index.html
<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 Nov 17, 2016
Kaikoura Quake photos located in Google Maps/Earth
View KaikouraQuake.kml
<?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 Oct 28, 2016
WPA Supplicant config file explanations
View wpa_supplicant.conf
##### 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.
You can’t perform that action at this time.