Skip to content

Instantly share code, notes, and snippets.

View mrbusche's full-sized avatar

Matt Busche mrbusche

View GitHub Profile
busches / Main.kt
Created July 20, 2021 01:59
Check if a video will play in the Pacifica
View Main.kt
import org.w3c.dom.Document
import org.xml.sax.InputSource
import java.math.BigInteger
import java.util.concurrent.TimeUnit
import javax.xml.parsers.DocumentBuilderFactory
import javax.xml.xpath.XPathConstants
import javax.xml.xpath.XPathFactory
cfjedimaster / gist:ee4a2fd935318e29bd5364d71ea221c1
Last active August 3, 2019 02:30
Bookmarklet to gray scale images w/o alt.
View gist:ee4a2fd935318e29bd5364d71ea221c1
var css = document.createElement("style");
css.type = "text/css";
css.innerHTML = "img[alt=\"\"],img:not([alt]){ filter:grayscale(100%) }";
soverby /
Last active October 19, 2023 06:06
RestTemplate backed by Apache HttpClient Connection Pool. Addresses RestTemplate HttpConnection exhaustion. Note this implementation is not route tunable and should be expanded when tuning by route is required. Example error: I/O error on POST request for "https://someendpoint": Timeout waiting for connection from pool; nested exception is org.a…
import org.apache.http.client.config.RequestConfig;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
public class ClientHttpPoolConfiguration {
jeffsheets / protractorFieldSelectionTest.spec.js
Created April 8, 2015 18:13
Protractor spec showing how to test for text selection inside a form input field
View protractorFieldSelectionTest.spec.js
* Initially written as a test for IE/Chrome for a bug in ui-mask.
* The test verifies that all of the text is selected in an input field when the field is tabbed into
describe('field selection test', function () {
beforeEach (function () {
ryanguill / dom-duplicate-element-ids-audit.js
Last active August 29, 2015 14:02
Small script that you can run in the console to see if you have more than one element with the same ID.
View dom-duplicate-element-ids-audit.js
var allElements = document.getElementsByTagName("*"), allIds = {}, dupIDs = [];
for (var i = 0, n = allElements.length; i < n; ++i) {
var el = allElements[i];
if ( {
if (allIds[] !== undefined) dupIDs.push(;
allIds[] = ||;
if (dupIDs.length) { console.error("Duplicate ID's:", dupIDs);} else { console.log("No Duplicates Detected"); }
anonymous / gist:9388472
Created March 6, 2014 12:23
Summing up contextual influence on systems architecture
View gist:9388472
1. Monolithic applications and architectures can vary in their monolithness. This is an under-specified description.
2. Microservice applications and architectures can vary in their microness. This is an under-specified description.
3. Microservices and monolithic architectures have both benefits and disadvantages.
4. Organizations will exploit those benefits while working around any weaknesses.
5. Success of the business is a large influence on the exploitation of benefits and implementation and costs of workarounds.
6. All benefits and work arounds are context-sensitive. Meaning that they are both technically and socially constructed by the organization that navigates them.
7. Path dependency is a thing. History matters and manifests in these architectural decisions and evolution in an organization.
8. Patterns exist to inform practice, not dictate it. Zealous adherence to an architectural pattern brings peril when it is to the exclusion of cultural context in actual practice.
9. Architectural patterns w
postmodern /
Last active July 15, 2023 17:24
Crypto Privacy Copy Pasta
markmandel / FutureThreadedWorker.cfc
Created November 26, 2012 03:58
View FutureThreadedWorker.cfc
Copyright 2012 Mark Mandel
Licensed 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