Skip to content

Instantly share code, notes, and snippets.

Michael Nutt mnutt

Block or report user

Report or block mnutt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View fix_qt_build_macos_10_13.patch
diff --git a/qtbase/src/gui/painting/ b/qtbase/src/gui/painting/
index 98fdd7f35e..c4fb8afc64 100644
--- a/qtbase/src/gui/painting/
+++ b/qtbase/src/gui/painting/
@@ -72,17 +72,8 @@ CGImageRef qt_mac_toCGImageMask(const QImage &image)
image.bytesPerLine(), dataProvider, NULL, false);
-OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage)
+void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage)
View raise_http_channel_count.patch
diff --git a/qtbase/src/network/access/qhttpnetworkconnection.cpp b/qtbase/src/network/access/qhttpnetworkconnection.cpp
index e6a15ccfc4..d635930bf7 100644
--- a/qtbase/src/network/access/qhttpnetworkconnection.cpp
+++ b/qtbase/src/network/access/qhttpnetworkconnection.cpp
@@ -67,10 +67,10 @@
-const int QHttpNetworkConnectionPrivate::defaultHttpChannelCount = 6;
+const int QHttpNetworkConnectionPrivate::defaultHttpChannelCount = 1000;
mnutt / bst.js
Last active Jun 14, 2017
Binary Search Tree Start
View bst.js
// `data` array contains 10 million random values
// and we want to a) determine whether or not a value is in the array,
// and b) determine the value before and after
// tell us how long a function takes to run
function profile(name, fn) {
console.log(`profiling ${name}`);
let start = new Date();
let out = fn();
out && console.log(out);
mnutt /
Last active Feb 28, 2017
RFC: Devops Clicker

Create a game in the style of Space Clicker / Clicking Bad (

You start off, and you have an app running on one server. It's on fire.

You're working for a revenue-generating company (right? right?) so every request you serve makes you money. $10 CPM.

If you maintain good uptime and low response times, traffic will increase. Similar to production and distribution in Clicking Bad, you need both to make maximum revenue.

To bootstrap yourself, you can answer requests by hand by clicking (hence the "clicker" part) to more quickly get money and level up. You'll pretty quickly leave that part behind, though.

mnutt / homebrew-qtwebkit-tp5-mac-frameworks.diff
Created Feb 10, 2017
View homebrew-qtwebkit-tp5-mac-frameworks.diff
diff --git a/Source/WebKit/PlatformQt.cmake b/Source/WebKit/PlatformQt.cmake
index 30b1a377aed..c373b58d8b0 100644
--- a/Source/WebKit/PlatformQt.cmake
+++ b/Source/WebKit/PlatformQt.cmake
@@ -387,20 +387,20 @@ install(
-set(WEBKIT_PKGCONGIG_DEPS "Qt5Core Qt5Gui Qt5Network")
+set(WEBKIT_PKGCONFIG_DEPS "Qt5Core Qt5Gui Qt5Network")
mnutt / components.slow-component.js
Last active Jan 30, 2017
DDAU with slow deserializer
View components.slow-component.js
import Ember from 'ember';
const { get, computed } = Ember;
function serialize(val) {
return JSON.stringify(val);
function deserialize(val) {
console.log('deserializing, this takes a long time...');
View qtwebkit.rb
class Qtwebkit < Formula
desc "Full-featured qt port of the WebKit rendering engine"
homepage ""
url ""
version "tp4"
sha256 "35fcf7e04742b040a072245d79f36d1486e63345a69f53e09408c6564d3bcf27"
revision 1
# to be changed to
View qtwebkit_segfault.txt
#0 0x00007ffff69d4720 in WebCore::ImageBuffer::context() const () from /usr/local/lib/
#1 0x00007ffff6f3d2b2 in WebCore::ShadowBlur::beginShadowLayer(WebCore::GraphicsContext&, WebCore::FloatRect const&) ()
from /usr/local/lib/
#2 0x00007ffff69c975d in WebCore::drawQtGlyphRun(WebCore::GraphicsContext&, QGlyphRun const&, QPointF const&, double) ()
from /usr/local/lib/
#3 0x00007ffff69ca897 in WebCore::FontCascade::drawGlyphs(WebCore::GraphicsContext&, WebCore::Font const&, WebCore::GlyphBuffer const&, int, int, WebCore::FloatPoint const&, WebCore::FontSmoothingMode) () from /usr/local/lib/
#4 0x00007ffff688e341 in WebCore::FontCascade::drawGlyphBuffer(WebCore::GraphicsContext&, WebCore::TextRun const&, WebCore::GlyphBuffer const&, WebCore::FloatPoint&) const () from /usr/local/lib/
#5 0x00007ffff688e6d5 in WebCore::FontCascade::drawText(WebCore::GraphicsContext&, WebCore::TextRun const&, WebCore::FloatPoint const&,
View sandstorm_backup_fail.txt
error: Backend hasn't responded in 30 seconds! Reconnecting.
capnp.js: before makeRemotePromise: ping { a: undefined, b: undefined, e: [] }
capnp.js: after makeRemotePromise: ping { a: undefined, b: undefined, e: [], cancel: [Function] }
capnp.js: outer promise: { a: undefined, b: undefined, e: [] }
capnp.js: before makeRemotePromise: get { a: undefined, b: undefined, e: [] }
capnp.js: after makeRemotePromise: get { a: undefined,
b: undefined,
e: [],
cachePolicy: {},
cancel: [Function] }
View gist:9fdebec76bcc71304f19
#0 0x00007ffff6e1f107 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007ffff6e204e8 in __GI_abort () at abort.c:89
#2 0x00007ffff7927b3d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/
#3 0x00007ffff7925bb6 in ?? () from /usr/lib/x86_64-linux-gnu/
#4 0x00007ffff7924ca9 in ?? () from /usr/lib/x86_64-linux-gnu/
#5 0x00007ffff792540b in __gxx_personality_v0 () from /usr/lib/x86_64-linux-gnu/
#6 0x00007ffff73bfff3 in ?? () from /lib/x86_64-linux-gnu/
#7 0x00007ffff73c0517 in _Unwind_Resume () from /lib/x86_64-linux-gnu/
#8 0x000000000043fb6e in kj::(anonymous namespace)::crashHandler(int, siginfo_t*, void*) ()
#9 <signal handler called>
You can’t perform that action at this time.