Skip to content

Instantly share code, notes, and snippets.

realityforge /
Created Feb 13, 2021
Example of doGetSerializationPolicy implementation
protected doGetSerializationPolicy( @javax.annotation.Nonnull final javax.servlet.http.HttpServletRequest request,
@javax.annotation.Nonnull final String moduleBase,
@javax.annotation.Nonnull final String strongName )
{ moduleBaseURL = null;
if ( null != moduleBase )
View StackTrace
Full thread dump
"qtp1101625662-61" #61 prio=5 os_prio=31 tid=0x00007fcd78195000 nid=0xee0b waiting on condition [0x000070000e1b7000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x0000000796d09ea0> (a java.util.concurrent.FutureTask)
at java.util.concurrent.locks.LockSupport.park(
at java.util.concurrent.FutureTask.awaitDone(
at java.util.concurrent.FutureTask.get(

Everything I Know About UI Routing


  1. Location - The location of the application. Usually just a URL, but the location can contain multiple pieces of information that can be used by an app
    1. pathname - The "file/directory" portion of the URL, like invoices/123
    2. search - The stuff after ? in a URL like /assignments?showGrades=1.
    3. query - A parsed version of search, usually an object but not a standard browser feature.
    4. hash - The # portion of the URL. This is not available to servers in request.url so its client only. By default it means which part of the page the user should be scrolled to, but developers use it for various things.
    5. state - Object associated with a location. Think of it like a hidden URL query. It's state you want to keep with a specific location, but you don't want it to be visible in the URL.
realityforge /
Created Nov 4, 2019
Making react4j-todomvc j2cl compatible

How to build

First you need to install updated build tools that does not copy the */public/ assets into the directory used by j2cl compile. To install build tools locally do:

> git clone
> cd j2cl
> git checkout NoCopyPublicAssets
> mvn clean install
View bazel query

bazel query cheatsheet

which packages depend on qtdb lib?

bazel query 'rdeps(..., //vistar/geo/qtdb:go_default_library)' --output package 

Test all libraries the depend upon //mylibrary

realityforge /
Created Jan 28, 2019 — forked from Jessidhia/
Implementation notes on react's scheduling model as of (shortly before) 16.8.0

Implementation notes on react's scheduling model as of (shortly before) 16.8.0

While the public API intended for users to use is the scheduler package, the reconciler currently does not use scheduler's priority classes internally.

ReactFiberScheduler has its own internal "mini-scheduler" that uses the scheduler package indirectly for its deadline-capable scheduleCallback.

This is kind of a documentation of implementation details that I suppose will be gone by the end of the year, but what can you do.

realityforge / sha512.rb
Created Feb 8, 2018
Extension for generating sha512 checksums
View sha512.rb
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with this
# work for additional information regarding copyright ownership. The ASF
# licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# Unless required by applicable law or agreed to in writing, software
realityforge / externalize.rb
Last active Feb 5, 2019
Setup a git repository master that points at actual repository
View externalize.rb
#WARNING this will delete local branches which may contain your changes
def mysystem(command, fail_on_error = true)
realityforge /
Created Jun 27, 2017
Git diff excluding vendor dir
git diff . ':(exclude)vendor/*'
realityforge / kill_deploy_jobs.groovy
Last active Mar 7, 2021
Kill all queued jenkins jobs
View kill_deploy_jobs.groovy
import hudson.model.*
def q = Jenkins.instance.queue
q.items.each {
if (it =~ /deploy-to/) {