Skip to content

Instantly share code, notes, and snippets.

James Roper jroper

Block or report user

Report or block jroper

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
@jroper
jroper / istio.yaml
Created May 21, 2019
Istio with outbound port exclusions
View istio.yaml
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 Oct 30, 2018
Allow password managers to work with ING Australia's login
View ing-password-manager-fix.js
// ==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==
View akka-http.log
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 Nov 14, 2017
CUA WAC password field enabler - for use with password managers.
View cua-wac-enabler.js
// ==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==
View 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 Jan 5, 2018
Play Angular 2 integration
View Angular2.scala
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 Jul 15, 2017
Akka streams LazyBroadcastHub - a broadcast hub that only keeps its source materialized as long as there are consumers
View LazyBroadcastHub.scala
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 Mar 12, 2018
Akka streams Source.restartWithBackoff
View SourceWithBackoffSupervision.scala
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 Jul 6, 2017
Akka streams multiple chat room example
View ChatSystem.scala
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
View returnkeyword.scala
// TEST 1:
// Without scrolling down, can you work out whether bar() is the return value, or a side effecting
// method call?
def test1(): Boolean = {
if (foo) {
bar()
} else {
/*
It is a truth universally acknowledged, that a single man in possession
of a good fortune, must be in want of a wife.
You can’t perform that action at this time.