Skip to content

Instantly share code, notes, and snippets.

View philipmuir's full-sized avatar
:shipit:
buymeacoffee.com/philipmuir

Philip Muir philipmuir

:shipit:
buymeacoffee.com/philipmuir
  • Sydney
  • 10:43 (UTC +11:00)
View GitHub Profile
@philipmuir
philipmuir / golang-install-on-debian.md
Created November 17, 2024 02:54 — forked from zoonderkins/golang-install-on-debian.md
Install Golang on Debian / Raspberry Pi #linux #arm64 #arm

Install Golang on Debian / Raspberry Pi

rm -rf /usr/local/go
GOVERSION="1.23.2"
wget "https://golang.org/dl/go${GOVERSION}.linux-arm64.tar.gz" -4
tar -C /usr/local -xvf "go${GOVERSION}.linux-amd64.tar.gz"
rm "go${GOVERSION}.linux-arm64.tar.gz"
@philipmuir
philipmuir / ASS.md
Created March 18, 2021 23:29 — forked from anonymous/ASS.md
Acronyms Seriously Suck - Elon Musk

From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:

There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.

That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.

@philipmuir
philipmuir / auth_mechanism.go
Created November 22, 2020 01:27
Vault Transit package with AWS login [WIP]
package vault
import (
"encoding/base64"
"encoding/json"
"fmt"
"io/ioutil"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/sts"

Keybase proof

I hereby claim:

  • I am philipmuir on github.
  • I am philipm (https://keybase.io/philipm) on keybase.
  • I have a public key ASCohipSBbHMQFd1A4YW4S30_CGoMk1hGIEiltVd8dQL-wo

To claim this, I am signing this object:

@philipmuir
philipmuir / BankTest.php
Last active October 28, 2019 02:21
Mutation testing
<?php
use Deputy\Insights\Bank;
use Deputy\Insights\BankAccountException;
use PHPUnit\Framework\TestCase;
class BankTest extends TestCase
{
public function testDefaultBankbalanceIsZero()
<?php
namespace Erudition;
use RuntimeException;
use SebastianBergmann\Comparator\Factory;
use SebastianBergmann\Comparator\ComparisonFailure;
use Throwable;
class ParallelCodePath
# Regular Expression Validation for IPv6 addresses in Ruby
#
# Inspired by (if not to say copied from): http://forums.dartware.com/viewtopic.php?t=452
# Thanks, Dartware!
#IPV6_REGEX = /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-