Skip to content

Instantly share code, notes, and snippets.

View ignasi35's full-sized avatar
Breaking CI builds since 2001

Ignasi Marimon-Clos ignasi35

Breaking CI builds since 2001
View GitHub Profile
View BST.scala
package com.marimon.datastructures
// based on
sealed trait BST[+A] {
import BST._
def insert[AA >: A](
newValue: AA
)(implicit ordering: Ordering[AA]): BST[AA] = {
val res =
import subprocess
import argparse
# Copy/paste/adapted from
def get_deployment_pods(app_name, namespace):
lines = subprocess.check_output(['kubectl', 'get', 'pods', '-n', namespace, '--selector=app=' + app_name]).split("\n")
lines.pop(0) # pop header row
pods = []
for line in lines:
ignasi35 / HelloreadSide.scala
Created February 21, 2020 08:49
Manually managed Lagom readside
View HelloreadSide.scala
class HelloreadSide extends ReadSideProcessor[HelloWorldEvent] {
override def aggregateTags: Set[AggregateEventTag[HelloWorldEvent]] =
override def buildHandler()
: ReadSideProcessor.ReadSideHandler[HelloWorldEvent] = {
new ReadSideHandler[HelloWorldEvent] {
override def globalPrepare(): Future[Done] = Future.successful(Done)
// Returns the last Offset processed by this readside processor.
override def prepare(
View NodeHash.scala
package example
// Based on which is part of
import java.util.Base64
import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations.{
ignasi35 /
Last active July 9, 2019 16:33
Kill the Zoom server
#!/usr/bin/env bash
## Based on recommendations in
## Kills the HTTP server started by Zoom in localhost
## The HTTP server is restarted every every time Zoom runs but it
## is not necessary to participate or host in calls. Start Zoom and kill the server immediately after.
echo "-----------------"
echo "Is ZOOM server running?"
lsof -i :19421
ignasi35 / mark-as-read.js
Created April 17, 2019 14:54
WIP - tampermokey to mark all closed as read on GH Notifications
View mark-as-read.js
// ==UserScript==
// @name GitHub Notifications - Mark all closed
// @namespace
// @version 1.0
// @description Mark closed issues, closed PRs and merged PRs as read
// @author ignasi35
// @match
// @include*/notifications
// @include*
// @license MIT
ignasi35 / github-notifications.js
Last active April 3, 2019 13:23 — forked from marcospereira/github-notifications.js
GitHub Notifications By Organizations
View github-notifications.js
// ==UserScript==
// @name GitHub Notifications By Organizations
// @namespace
// @version 1.0
// @description Group the notifications list by organizations
// @author marcospereira
// @match
// @include*/notifications
// @include*
// @license MIT
ignasi35 / lagom-exitJvm-on-downing.txt
Created November 20, 2018 19:49
Deadlock on Lagom 1.5.0-RC1 using `exit-jvm` when Downing.
View lagom-exitJvm-on-downing.txt
2018-11-20 20:48:46
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.172-b11 mixed mode):
"JMX server connection timeout 67" #67 daemon prio=9 os_prio=31 tid=0x00007f9c02216000 nid=0x6e07 in Object.wait() [0x00007000115a0000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at com.sun.jmx.remote.internal.ServerCommunicatorAdmin$
- locked <0x000000076c7dcd98> (a [I)
ignasi35 / .bash_profile
Created September 21, 2018 08:38
Personal notes for bash profile
View .bash_profile
# Add Homebrew `/usr/local/bin` and User `~/bin` to the `$PATH`
export PATH
# Load the shell dotfiles, and then some:
# * ~/.path can be used to extend `$PATH`.
# * ~/.extra can be used for other settings you don’t want to commit.
for file in ~/.{path,bash_prompt,exports,aliases,functions,extra}; do
[ -r "$file" ] && source "$file"
View Play.scala
* Copyright (C) 2009-2018 Lightbend Inc. <>
package play.api
import java.util.concurrent.atomic.AtomicReference
import akka.Done