Skip to content

Instantly share code, notes, and snippets.

View AdamMcCormick's full-sized avatar
🚂
Just chugging along.

Adam McCormick AdamMcCormick

🚂
Just chugging along.
View GitHub Profile
@jethrolarson
jethrolarson / gist:65732a8ba9b4f620b68930923ec3c48a
Created June 21, 2017 22:49
Big O notation for story estimation
O(1) - Trivial, we've done something almost exactly like this and it wont take long to complete at all
O(log n) - Need to add a small capability then it's copy-pasta
O(n) - Simple, It's like things we've done before. No refactoring or architectural changes needed.
O(n^2) - Going to need to rework some things and watch out for regressions
O(n!) - Major rework needed, lots of risk
O(MG) - This is so complex or ill-defined that it may never complete
@OrganicPanda
OrganicPanda / hacky-scrollbar-resize-listener.js
Last active April 7, 2024 10:53
A sham that will throw a window resize event even when scrollbars are added/removed (this is not something the standard window resize event does). Tested in IE9+, Chrome & Firefox latest.
// Demo: http://jsfiddle.net/pFaSx/
// Create an invisible iframe
var iframe = document.createElement('iframe');
iframe.id = "hacky-scrollbar-resize-listener";
iframe.style.cssText = 'height: 0; background-color: transparent; margin: 0; padding: 0; overflow: hidden; border-width: 0; position: absolute; width: 100%;';
// Register our event when the iframe loads
iframe.onload = function() {
// The trick here is that because this iframe has 100% width