This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hole JOan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.marimon.datastructures | |
// based on https://gist.github.com/alhuelamo/3f610055167301d4d2f2d32a954d4b18 | |
sealed trait BST[+A] { | |
import BST._ | |
def insert[AA >: A]( | |
newValue: AA | |
)(implicit ordering: Ordering[AA]): BST[AA] = { | |
val res = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import argparse | |
# Copy/paste/adapted from https://raw.githubusercontent.com/lightbend/lb-demos/master/bin/network_tool.py | |
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HelloreadSide extends ReadSideProcessor[HelloWorldEvent] { | |
override def aggregateTags: Set[AggregateEventTag[HelloWorldEvent]] = | |
Set(HelloWorldEvent.Tag.tag) | |
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( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package example | |
// Based on https://gist.github.com/412b/b383f0864c9dd4378ce22d616c694d64 which is part of https://github.com/akka/akka/pull/27309 | |
import java.security.MessageDigest | |
import java.util.Base64 | |
import java.util.concurrent.TimeUnit | |
import org.openjdk.jmh.annotations.{ | |
OutputTimeUnit, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## Based on recommendations in https://medium.com/@jonathan.leitschuh/zoom-zero-day-4-million-webcams-maybe-an-rce-just-get-them-to-visit-your-website-ac75c83f4ef5 | |
## 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name GitHub Notifications - Mark all closed | |
// @namespace https://github.com | |
// @version 1.0 | |
// @description Mark closed issues, closed PRs and merged PRs as read | |
// @author ignasi35 | |
// @match https://github.com/notifications | |
// @include https://github.com/*/notifications | |
// @include https://github.com/notifications/* | |
// @license MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name GitHub Notifications By Organizations | |
// @namespace https://github.com | |
// @version 1.0 | |
// @description Group the notifications list by organizations | |
// @author marcospereira | |
// @match https://github.com/notifications | |
// @include https://github.com/*/notifications | |
// @include https://github.com/notifications/* | |
// @license MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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$Timeout.run(ServerCommunicatorAdmin.java:168) | |
- locked <0x000000076c7dcd98> (a [I) | |
at java.lang.Thread.run(Thread.java:748) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add Homebrew `/usr/local/bin` and User `~/bin` to the `$PATH` | |
PATH=/usr/local/bin:$PATH | |
PATH=$HOME/bin:$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" |
NewerOlder