Skip to content

Instantly share code, notes, and snippets.

@davidmoten
davidmoten / gist:b52683a278778e16d029
Last active November 28, 2023 22:22
How to contribute to a project on GitHub

How to contribute to a project on GitHub

Fork the project to your account

Login to github, go to project and click on Fork

Clone from fork to local

git clone https://github.com/davidmoten/RxJava.git

Locally add the upstream project

git remote add upstream https://github.com/ReactiveX/RxJava.git

This file has been truncated, but you can view the full file.
26903: /austest/jdk/jdk1.8.0_322/jre/bin/java -Dprocess.name=test-tomcat -Dmo
------------ lwp# 1 / thread# 1 ---------------
fffffffeffae23f4 lwp_wait (2, ffffffff7fffc6e0)
fffffffeffad93a0 _thrp_join (2, 0, ffffffff7fffc850, 1, ffffffff7fffc6e0, fffffffeffc2c940) + 18
fffffffeffad9538 thr_join (2, 0, ffffffff7fffc850, ffffffff7fffc910, 0, ffffffff7fffc85c) + 10
fffffffefb910f44 ContinueInNewThread0 (fffffffefb907748, 100000, ffffffff7fffc910, ffffffff7fffc9a8, 44, 100000) + 30
fffffffefb90dd2c ContinueInNewThread (ffffffff7fffcb38, fffffffefeaedc08, 114400, ffffffffffeebb60, fffffffefeaed960, fffffffefeaed9e8) + 94
fffffffefb910fc0 JVMInit (ffffffff7fffcb38, 0, 1, 1001018a8, 1, ffffffff7fffe7ec) + 2c
fffffffefb907718 JLI_Launch (0, fffffffefb91a098, aa8, 800, ffffffffffeff038, 100c00) + 388
0000000100000ad0 main (1, 100000b70, 100000b50, 100000b58, 100000, 400) + 90
@davidmoten
davidmoten / threads.txt
Last active May 20, 2022 00:03
Blocked threads, first line of every thread's stack trace
- akka.dispatch.TaskInvocation$.apply(akka.event.EventStream, java.lang.Runnable, scala.Function0) @bci=0, line=45 (Interpreted frame)
- au.gov.amsa.drift.wms.DriftData.refresh() @bci=26, line=83 (Interpreted frame)
- au.gov.amsa.util.rx.RxUtil$2.call(java.lang.Object) @bci=30, line=88 (Interpreted frame)
- com.sun.jmx.remote.internal.ServerCommunicatorAdmin.logtime(java.lang.String, long) @bci=5, line=210 (Interpreted frame)
- com.sun.org.apache.xml.internal.serializer.NamespaceMappings.initNamespaces() @bci=20, line=122 (Compiled frame)
- com.zaxxer.hikari.pool.HikariPool$HouseKeeper.run() @bci=298, line=795 (Interpreted frame)
- com.zaxxer.hikari.pool.HikariPool$HouseKeeper.run() @bci=298, line=795 (Interpreted frame)
- com.zaxxer.hikari.pool.HikariPool$HouseKeeper.run() @bci=298, line=795 (Interpreted frame)
- com.zaxxer.hikari.pool.HikariPool$HouseKeeper.run() @bci=298, line=795 (Interpreted frame)
- com.zaxxer.hikari.pool.HikariPool$HouseKeeper.run() @bci=433, line=808 (Interpreted frame)
{
"openapi": "3.0.0",
"info": {
"version": "1.0",
"title": "Beacon Decoder",
"description": "Beacon decoding for First Generation and Second Generation Beacon HexIds and Detection messages"
},
"paths": {
"/beacon/hexId/{hex}/decode": {
"get": {

When writing your CloudFormation yaml:

  • Don't use Default values on Parameter. This is because making a change to just the Default value of a parameter is not considered by CloudFormation in it's difference analysis. Once the value has been set it stays set.
  • Use !Ref parameterName instead of !Sub '${parameterName}'
  • Don't pollute the cloudformation.yaml with notions of non-prod and prod modes. Pass one application parameter in with names like myapp-dev, myapp-test and use ${application} to build your resource names.
  • When you create buckets use a suffix with the lower-case (an S3 constraint) account id. This is so you can deploy your cloudformation.yaml to any account without conflicts.
  • Never use that Fn:Join nonsense. Use !Sub instead. For example:
!Sub "arn:aws:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:${mySecretName}-*
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
2019-11-01 02:00:00 150.64640324219087
2019-11-01 03:00:00 3.0346504559370184
2019-11-01 04:00:00 79.3982868194948
2019-11-01 05:00:00 115.18010500147818
2019-11-01 06:00:00 88.12555954679421
2019-11-01 07:00:00 144.42418101988704
2019-11-01 08:00:00 127.0908476866422
2019-11-01 09:00:00 87.0908476865906
2019-11-01 10:00:00 169.31306990880188
2019-11-01 11:00:00 112.8686254643784

With markdown table with extra Notes column we get pretty horrendous Notes column size (small) as the screen width lowers. Once you get to mobile it's very yuk. In fact the dominant column in terms of size is determined by the longest text in a cell so if a long note gets put in then that will make the Notes column dominate sizing:

ID Rule Notes
1 A Subscriber MUST signal demand via Subscription.request(long n) to receive onNext signals. It is intended blah blah that something happens here that is not confusing and stuff
2 If a Subscriber suspects that its processing of signals w
@davidmoten
davidmoten / gist:7a687c85abc808704086
Last active September 3, 2019 08:59
Git branch bash prompt
# Load in the git branch prompt script.
source ~/.git-prompt.sh

if [ "$color_prompt" = yes ]; then
 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]'"\$(__git_ps1)"'\$ '
@davidmoten
davidmoten / script.sh
Last active September 3, 2019 08:56
How to include a java class with main method in a bash script
#!/bin/bash
set -e
TEMPFILE=`mktemp /tmp/ScriptXXXXX|sed -e 's/\.//g'`
CLASS_NAME=`basename "$TEMPFILE"`
JAVA_SOURCE=$TEMPFILE.java
cat <<EOF >$JAVA_SOURCE.tmp
//Write your java class here with a main method
//Be sure to leave the name of the class as Script