Skip to content

Instantly share code, notes, and snippets.

t-bast /
Last active Jul 11, 2020
Lightning transactions: from Zero to Hero
# -*- coding: utf-8 -*-
Created on Sat Dec 17 11:33:35 2016
from __future__ import division, print_function
from numpy.random import multivariate_normal
import matplotlib.pyplot as plt
from scipy.spatial.distance import cdist
import numpy as np
OrganicPanda / hacky-scrollbar-resize-listener.js
Last active Apr 7, 2020
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.
View hacky-scrollbar-resize-listener.js
// Demo:
// Create an invisible iframe
var iframe = document.createElement('iframe'); = "hacky-scrollbar-resize-listener"; = '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
You can’t perform that action at this time.