Skip to content

Instantly share code, notes, and snippets.

View Tombarr's full-sized avatar
:octocat:
Coding

Tom Barrasso Tombarr

:octocat:
Coding
View GitHub Profile
@Tombarr
Tombarr / Interval & Timeout Tracker
Last active April 6, 2018 15:47
Track Global Timeouts and Intervals
(() => {
let timeouts = [];
let intervals = [];
const _setTimeout = window.setTimeout;
const _setInterval = window.setInterval;
const _clearTimeout = window.clearTimeout;
const _clearInterval = window.clearInterval;
window.setTimeout = (func, delay) => {
@Tombarr
Tombarr / Trie.js
Last active June 25, 2023 21:48 — forked from tpae/Trie.js
Trie.js - super simple JavaScript implementation
// Trie.js - super simple JS implementation
// https://en.wikipedia.org/wiki/Trie
// From https://gist.github.com/tpae/72e1c54471e88b689f85ad2b3940a8f0
// Modified to support key -> value mapping for quick object retrieval,
// using an ES6 Map instead of plain JS object, and optional case insensitivity.
// Values are automatically converting to arrays to support multiple values
// mapped to a single tree leaf.
// Example:
@Tombarr
Tombarr / input-reset.css
Last active January 8, 2025 22:06
CSS to remove input pseudo-elements and normalize input styling cross-browser
/* All of our custom controls should be what we expect them to be */
input,
textarea {
-webkit-box-sizing:content-box;
-moz-box-sizing:content-box;
box-sizing:content-box;
}
/*
Show overflow in Edge
package me.barrasso.android.volume.ui;
/*
* Copyright (C) 2010 The Android Open Source Project
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
package com.tombarrasso.android;
/*
* Copyright (c) 2014. Thomas James Barrasso
*
* 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