Skip to content

Instantly share code, notes, and snippets.

Avatar

Peter Donald realityforge

View GitHub Profile
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(LockSupport.java:175)
at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:429)
at java.util.concurrent.FutureTask.get(FutureTask.java:191)
at com.google.gwt.dev.codeserver.JobRunner.getRecompileJs(JobRunner.java:71)
View everything-i-know-about-routing.md

Everything I Know About UI Routing

Definitions

  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
realityforge / Notes.md
Created Nov 4, 2019
Making react4j-todomvc j2cl compatible
View Notes.md

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 https://github.com/realityforge/j2cl.git
> cd j2cl
> git checkout NoCopyPublicAssets
> mvn clean install
View bazel query cheatsheet.md

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
realityforge / react-scheduler.md
Created Jan 28, 2019 — forked from Jessidhia/react-scheduler.md
Implementation notes on react's scheduling model as of (shortly before) 16.8.0
View react-scheduler.md

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
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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@realityforge
realityforge / externalize.rb
Last active Feb 5, 2019
Setup a git repository master that points at actual repository
View externalize.rb
PROJECT_NAME='jsinterop-generator'
PROJECT_SLUG='jsinterop-generator'
UPSTREAM_OWNER='google'
LOCAL_OWNER='realityforge'
LOCAL_BRANCHES_TO_KEEP=%w(TravisCiIntegration)
#WARNING this will delete local branches which may contain your changes
DELETE_LOCAL_BRANCHES=true
def mysystem(command, fail_on_error = true)
@realityforge
realityforge / diff.sh
Created Jun 27, 2017
Git diff excluding vendor dir
View diff.sh
git diff . ':(exclude)vendor/*'
@realityforge
realityforge / kill_deploy_jobs.groovy
Last active Jan 5, 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/) {
q.cancel(it.task)
}
}
@realityforge
realityforge / maven_clone.rb
Created Aug 9, 2016
Copy artifacts from one Maven repository to another
View maven_clone.rb
#!/usr/bin/env ruby
require 'fileutils'
# Run this form the directory that is being uploaded.
# It will delete the file as it goes
USER='user'
PASSWORD='password'
REPO='repo.example.com/repository/thirdparty'