Skip to content

Instantly share code, notes, and snippets.

View craigmj's full-sized avatar

Craig Mason-Jones craigmj

View GitHub Profile
craigmj / find_el_causing_hscroll.html
Created November 28, 2019 16:34
Javascript method to find an element in html that causes a page to horizontally scroll. See console output for element tree - last element is the culprit.
View find_el_causing_hscroll.html
<!doctype html>
<meta charset="utf-8"/>
<div id="outer">
<div id="inner">
<div id="third" style="width: 2500px;">
This is probably the issue.
View rainbow.html
<!doctype html>
<title>The Rainbow</title>
body {
background-color: #333;
font-weight: bold;
font-size: 64px;
color: white;
View sse.go
package webutil
import (
// ByteWriter is a one-off utility type for writing to http.ResponseWriter
type ByteWriter struct {
craigmj / gomaps.go
Created June 13, 2013 01:07
Performance testing of goroutine vs sync map implementation in Go.
View gomaps.go
package main
import (