Skip to content

Instantly share code, notes, and snippets.

View jroper's full-sized avatar

James Roper jroper

View GitHub Profile
git config --global alias.br "for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'"
@jroper
jroper / istio.yaml
Created May 21, 2019 02:10
Istio with outbound port exclusions
apiVersion: v1
kind: Namespace
metadata:
name: istio-system
labels:
istio-injection: disabled
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
@jroper
jroper / ing-password-manager-fix.js
Last active February 3, 2021 02:43
Allow password managers to work with ING Australia's login
// ==UserScript==
// @name ING Australia Password Manager Fix
// @namespace https://jazzy.id.au/
// @version 0.1
// @description Allows the industry best practice of using a password manager for storing passwords for ING Australia's login screen.
// @author James Roper
// @match https://www.ing.com.au/securebanking/
// @grant none
// ==/UserScript==
2017-12-01 03:27:53,393 [warn] a.a.ActorSystemImpl - Illegal request, responding with status '501 Not Implemented': Unsupported HTTP method: REMOTE
2017-12-01 09:45:51,585 [warn] a.a.ActorSystemImpl - Illegal request, responding with status '501 Not Implemented': Unsupported HTTP method: REMOTE
2017-12-01 13:59:12,597 [warn] a.a.ActorSystemImpl - Illegal request, responding with status '501 Not Implemented': Unsupported HTTP method: REMOTE
2017-12-01 14:20:36,406 [warn] a.a.ActorSystemImpl - Illegal request, responding with status '501 Not Implemented': Unsupported HTTP method: REMOTE
2017-12-01 14:50:42,963 [warn] a.a.ActorSystemImpl - Illegal request, responding with status '501 Not Implemented': Unsupported HTTP method: REMOTE
2017-12-01 15:02:31,413 [warn] a.a.ActorSystemImpl - Illegal request, responding with status '501 Not Implemented': Unsupported HTTP method: REMOTE
2017-12-01 19:13:16,970 [warn] a.a.ActorSystemImpl - Illegal request, responding with status '501 Not Implemented': Unsupported HTTP met
@jroper
jroper / cua-wac-enabler.js
Created November 14, 2017 23:42
CUA WAC password field enabler - for use with password managers.
// ==UserScript==
// @name CUA WAC password field enabler
// @namespace https://jazzy.id.au
// @version 0.1
// @description Enable the WAC password field so that a password manager can fill it.
// @author James Roper
// @match https://ob.cua.com.au/ib/*/*Login*.action
// @grant none
// ==/UserScript==
@jroper
jroper / keybase.md
Created September 19, 2017 02:43
keybase.md

Keybase proof

I hereby claim:

  • I am jroper on github.
  • I am jroper (https://keybase.io/jroper) on keybase.
  • I have a public key ASDmToLnfJ0iYnejVzX5FIoZNvTJi_A9SX3kF12i-1pbwgo

To claim this, I am signing this object:

@jroper
jroper / Angular2.scala
Last active May 19, 2021 15:00
Play Angular 2 integration
import play.sbt.PlayRunHook
import sbt._
import java.net.InetSocketAddress
object Angular2 {
def apply(log: Logger, base: File, target: File): PlayRunHook = {
object Angular2Process extends PlayRunHook {
private var watchProcess: Option[Process] = None
@jroper
jroper / LazyBroadcastHub.scala
Created July 15, 2017 11:06
Akka streams LazyBroadcastHub - a broadcast hub that only keeps its source materialized as long as there are consumers
package streams.utils
import akka.NotUsed
import akka.stream._
import akka.stream.scaladsl.{BroadcastHub, Keep, RunnableGraph, Source}
import akka.stream.stage._
import scala.concurrent.duration.{Duration, FiniteDuration}
/**
@jroper
jroper / SourceWithBackoffSupervision.scala
Last active March 12, 2018 14:22
Akka streams Source.restartWithBackoff
package streams.utils
import java.util.concurrent.ThreadLocalRandom
import akka.NotUsed
import akka.stream._
import akka.stream.scaladsl.Source
import akka.stream.stage._
import scala.concurrent.duration._
@jroper
jroper / ChatSystem.scala
Last active March 22, 2024 09:14
Akka streams multiple chat room example
import akka.stream._
import akka.stream.scaladsl.{BroadcastHub, Flow, Keep, MergeHub, Sink, Source}
import akka.stream.stage.{GraphStageLogic, GraphStageWithMaterializedValue, InHandler, OutHandler}
import scala.collection.concurrent.TrieMap
sealed trait ChatEvent {
def room: String
}
case class ChatMessage(user: String, room: String, message: String) extends ChatEvent