Skip to content

Instantly share code, notes, and snippets.

View stevoland's full-sized avatar

Stephen J. Collings stevoland

View GitHub Profile
@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)
@stevoland
stevoland / gist:39de1421bc64131f5667a65744b8ea96
Created October 14, 2021 17:51
SAGO@who.int: Public comments on SAGO members
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
@stevoland
stevoland / hyphenateLongWords.js
Created September 12, 2012 09:45
Hyphenate long words
/**
* Add a soft hypen (­) to any words in the string longer than the given character length
*
* @param {string} str Input string
* @param {int} maxWordSize Max character length of a word
* @param {int} minFragmentSize [optional] Minimum chars to leave after a hyphen
* @return {string}
*/
var hyphenateLongWords = function (str, maxWordSize, minFragmentSize) {
// TODO: Find out char codes of word break chars