Skip to content

Instantly share code, notes, and snippets.

IanColdwater / twittermute.txt
Last active May 11, 2021
Here are some terms to mute on Twitter to clean your timeline up a bit.
View twittermute.txt
Mute these words in your settings here:

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.
Jessidhia /
Last active Apr 30, 2021
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.

ibaca /
Last active Jul 24, 2020
JAX-RS GWT Logging service
package com.intendia.igestion.server.util;
import static com.intendia.igestion.shared.util.ToolsRestService.logRecordFromDto;
import com.intendia.igestion.shared.util.ToolsRestService;
import io.reactivex.Completable;
package com.intendia.igestion.common.util;
import elemental2.dom.Blob;
import elemental2.dom.File;
import javax.annotation.Nullable;
import jsinterop.annotations.JsMethod;
import jsinterop.annotations.JsPackage;
public class FileSaver {
GNSPS / ProxyFactory.sol
Last active Dec 21, 2020
Improved `delegatecall` proxy contract factory (Solidity) [v0.0.5]
View ProxyFactory.sol
* Shoutouts:
* Bytecode origin
* Modified version of Vitalik's
* Credits to Jorge Izquierdo (@izqui) for coming up with this design here:
* Credits to Stefan George (@Georgi87) for inspiration for many of the improvements from Gnosis Safe:
* This version has many improvements over the original @izqui's library like using REVERT instead of THROWing on failed calls.
* It also implements the awesome design pattern for initializing code as seen in Gnosis Safe Factory:
axic /
Created Feb 10, 2017
WebAssembly kickstart guide

WebAssembly kickstart guide

Rolling your own compiler

One of the premises of WebAssembly is to support compiling multiple languages to WebAssembly.



ethers / call-then-sendtx-pattern.js
Last active Jul 24, 2020
call-then-sendtx pattern for Ethereum Dapps
View call-then-sendtx-pattern.js
In Ethereum, a contract can be written so that it returns a value for eth_call.
A Dapp can then check for success or error value of eth_call, before calling eth_sendTransaction,
to take advantage of eth_call effectively being a "preview" of the code flow that the transaction
will take. In traditional client-server, clients can't ask servers beforehand what's going to
happen when the client makes a call; with Dapps contracts can be written so that clients can ask
for a "preview" of what is going to happen, before any funds/ethers are actually utilized
(eth_call does not cost any ethers).
Note: it is possible that in between eth_call and when eth_sendTransaction is actually mined,
public class SuperDevModeUncaughtExceptionHandler implements GWT.UncaughtExceptionHandler {
public void onUncaughtException(final Throwable t) {
logException(t, false);