Skip to content

Instantly share code, notes, and snippets.

View stevoland's full-sized avatar
🏠

Stephen J. Collings stevoland

🏠
View GitHub Profile
@stevoland
stevoland / babel-plugin-react-hook-form-no-memo.md
Last active December 6, 2024 09:08
babel-plugin-react-hook-form-no-memo

react-hook-form (as of v7.53) may behave incorrectly when user code is compiled with react-compiler.

This babel plugin can be applied before the compiler to opt-out all functions which reference useForm by inserting the "use no memo" directive.

Only supports using the named export:

// worky
import { useForm } from 'react-hook-form
const Component = () => {

Letby victim terms

Couldn't find this data summarised anywhere. Corrections welcome.

Methodology

Searched available media sourced on trial reporting for the terms of the 17 babies Lucy Letby was accused of assaulting.

Results

@stevoland
stevoland / stacktrace
Last active April 25, 2023 17:21
Proguard mapping upload
Uploading mapping file for native:2.70.0 {variant:staging} (site=datadoghq.eu):
Creating request with GZIP encoding.
Error uploading the mapping file for native:2.70.0 {variant:staging}
java.net.ConnectException: Failed to connect to sourcemap-intake.datadoghq.eu/2600:1901:0:606b:0:0:0:0:443
at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:297)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207)
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
My comments are related to the origins of SARS-CoV-2 and should be
read in the following context:
In regards to SAGO, WHO Director-General Dr Tedros Adhanom Ghebreyesus
writes[1] “a fully open and transparent scientific process is
essential” and that “laboratory hypotheses must be examined carefully,
with a focus on labs in the location where the first reports of human
infections emerged in Wuhan.”
You will be aware that the Wuhan Institute of Virology (WIV) is a
@stevoland
stevoland / .eslintrc
Created December 18, 2014 11:42
.eslintrc
{
"env": {
"browser": true,
"amd": true
},
"rules": {
"quotes": [2, "single"],
"no-underscore-dangle": [0],
"no-trailing-spaces": [2],
"no-mixed-spaces-and-tabs": [2],
@stevoland
stevoland / shouldRenderForClientMixin.js
Last active August 29, 2015 14:08
shouldRenderForClientMixin
var shouldRenderForClientMixin = {
componentDidMount: function () {
this.setState({
renderForClient: true
})
},
shouldRenderForClient: function () {
return typeof document !== 'undefined' && this.state && this.state.renderForClient;
}
/** @jsx React.DOM */
var PanelGroup = ReactBootstrap.PanelGroup;
var Panel = ReactBootstrap.Panel;
var mountNode = document.body;
var renderedInstance;
var PanelGroups = React.createClass({
@stevoland
stevoland / simulateDOMEvent.js
Created September 13, 2012 11:48
Simulate DOM Event
function simulate(element, eventName)
{
var options = extend(defaultOptions, arguments[2] || {});
var oEvent, eventType = null;
for (var name in eventMatchers)
{
if (eventMatchers[name].test(eventName)) { eventType = name; break; }
}
@stevoland
stevoland / getCSSSelector.js
Created September 13, 2012 11:11
Get CSS Selector for an element
function getCSSSelector(el) {
var names = [];
while (el.parentNode) {
if (el.id) {
names.unshift('#' + el.id);
break;
} else {
if (el == el.ownerDocument.documentElement) {
names.unshift(el.tagName);
} else {
@stevoland
stevoland / jquery.centerInViewport.js
Created September 12, 2012 09:48
jQuery Center in viewport method
/**
* Vertically center an element (popup modal) to the viewport
* If the element is taller than the window height absolute positioning is
* used so that the element will scroll with the docuemnt
*
* @param {boolean} animate Animate to new position or move immediately? Defaults true
* @param {boolean} centerHorizontal Center the element horizontally? Defaults true
* @param {boolean} centerVertical Center the element vertically? Defaults true
*
* @chainable