Skip to content

Instantly share code, notes, and snippets.

View mnutt's full-sized avatar

Michael Nutt mnutt

View GitHub Profile
@mnutt
mnutt / homebrew-qtwebkit-tp5-mac-frameworks.diff
Created February 10, 2017 16:49
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(
${KDE_INSTALL_INCLUDEDIR}/QtWebKit/${PROJECT_VERSION}/QtWebKit/private
)
-set(WEBKIT_PKGCONGIG_DEPS "Qt5Core Qt5Gui Qt5Network")
+set(WEBKIT_PKGCONFIG_DEPS "Qt5Core Qt5Gui Qt5Network")
@mnutt
mnutt / components.slow-component.js
Last active January 30, 2017 02:19
DDAU with slow deserializer
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...');
class Qtwebkit < Formula
desc "Full-featured qt port of the WebKit rendering engine"
homepage "https://github.com/annulen/webkit"
url "https://github.com/annulen/webkit/releases/download/qtwebkit-tp4/qtwebkit-tp4.tar.xz"
version "tp4"
sha256 "35fcf7e04742b040a072245d79f36d1486e63345a69f53e09408c6564d3bcf27"
revision 1
# to be changed to https://github.com/annulen/webkit.git
@mnutt
mnutt / qtwebkit_segfault.txt
Created July 17, 2016 13:44
QtWebkit segfault
#0 0x00007ffff69d4720 in WebCore::ImageBuffer::context() const () from /usr/local/lib/libQt5WebKit.so.5
#1 0x00007ffff6f3d2b2 in WebCore::ShadowBlur::beginShadowLayer(WebCore::GraphicsContext&, WebCore::FloatRect const&) ()
from /usr/local/lib/libQt5WebKit.so.5
#2 0x00007ffff69c975d in WebCore::drawQtGlyphRun(WebCore::GraphicsContext&, QGlyphRun const&, QPointF const&, double) ()
from /usr/local/lib/libQt5WebKit.so.5
#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/libQt5WebKit.so.5
#4 0x00007ffff688e341 in WebCore::FontCascade::drawGlyphBuffer(WebCore::GraphicsContext&, WebCore::TextRun const&, WebCore::GlyphBuffer const&, WebCore::FloatPoint&) const () from /usr/local/lib/libQt5WebKit.so.5
#5 0x00007ffff688e6d5 in WebCore::FontCascade::drawText(WebCore::GraphicsContext&, WebCore::TextRun const&, WebCore::FloatPoint const&,
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] }
@mnutt
mnutt / gist:9fdebec76bcc71304f19
Created January 10, 2016 22:35
capnp segfault
#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/libstdc++.so.6
#3 0x00007ffff7925bb6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff7924ca9 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffff792540b in __gxx_personality_v0 () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007ffff73bfff3 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
#7 0x00007ffff73c0517 in _Unwind_Resume () from /lib/x86_64-linux-gnu/libgcc_s.so.1
#8 0x000000000043fb6e in kj::(anonymous namespace)::crashHandler(int, siginfo_t*, void*) ()
#9 <signal handler called>
@mnutt
mnutt / README.md
Last active December 26, 2015 06:59
Chalk drawer simulation

Update the rope lengths using update(leftLength, rightLength).

@mnutt
mnutt / example.hbs
Created August 25, 2013 19:56
Ember Modal Component test. The component takes a 'title' property and generates a button. When you click the button, it creates a dynamic child view appended to the body yielding whatever content was passed into the component block.
{{#modal-popup title="Edit Pic"}}
<!-- this goes inside the modal -->
<div class='pic'>
<div class="form">
{{input value=pic.url}}
</div>
</div>
{{/modal-popup}}
@mnutt
mnutt / concurrency_limiter.coffee
Created July 15, 2013 23:35
Simple node.js concurrency limiter
# Limits concurrency to @limit requests at any given time.
#
# Every time limiter.run() is called, concurrent load is incremented by one and
# the function you pass into it is called with a single argument of the 'done'
# function. When your work is complete, call the 'done' function and the
# concurrent load will be decremented by one.
#
# Usage:
#
# ConcurrencyLimiter = require('limiter')

Keybase proof

I hereby claim:

  • I am mnutt on github.
  • I am mnutt (https://keybase.io/mnutt) on keybase.
  • I have a public key whose fingerprint is 211B F6A1 E4CD 72C9 57B7 05FA 8EE8 B925 0C80 3854

To claim this, I am signing this object: