Skip to content

Instantly share code, notes, and snippets.

@iamralpht
iamralpht / Cargo output
Created October 23, 2014 04:11
GL binding error
Compiling Viewdo v0.0.1 (file:///home/ralpht/homework/viewdo/rust)
/home/ralpht/homework/viewdo/rust/src/main.rs:10:27: 10:31 error: Expected a generator argument name, either: `api`, `profile`, `version`, `generator`, or `extensions`.
/home/ralpht/homework/viewdo/rust/src/main.rs:10 generate_gl_bindings!("gl", "core", "2.0", "static")
^~~~
error: aborting due to previous error
Could not compile `Viewdo`.
@iamralpht
iamralpht / cook.js
Created October 9, 2014 18:15
GreenBean cook script for JB850
/*
* This application will attempt to start a cook mode on the upper oven. If
* remote control is disabled on the oven, an error is printed and the user
* is asked to press the remote enable button on the range. Once remote
* control is enabled, the cook mode is started.
*
* Copyright (c) 2014 General Electric
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@iamralpht
iamralpht / gist:f6f45dda9e6b391d31d3
Created October 9, 2014 18:13
GreenBean range output
ralpht@darkstar:~/home/oven/node_modules/green-bean$ sudo node cook-orig.js
range version: 0.5.2.0
send wifi enable message
oven configuration changed: 40
upper oven current state changed: 0
upper oven cook mode changed: { mode: 0,
cookTemperature: 0,
cookHours: 0,
cookMinutes: 0,
probeTemperature: 0,
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
#section {
width: 420px;
height: 630px;
border: 5px solid rgb(204, 204, 204);
@iamralpht
iamralpht / .bashrc
Last active January 3, 2016 11:49
bashrc hacks for per-directory history
# Hack to implement per-directory history. If you run the same commands in the same directories,
# then why not have a separate history for each directory?
HISTBASE=~/.bash_directory_hist
LASTHIST=
_hash() {
echo "$@" | sha512sum | cut -f1 -d' '
}
@iamralpht
iamralpht / ScrollingCoordinator.cpp.diff
Created December 14, 2012 23:21
Reduce the number of rects emitted by computeAbsoluteTouchEventTargetRects
diff --git a/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp b/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
index 1d8ad6a..d56bb11 100644
--- a/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
+++ b/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
@@ -149,14 +149,18 @@ static Region computeNonFastScrollableRegion(Frame* frame, const IntPoint& frame
}
#if ENABLE(TOUCH_EVENT_TRACKING)
-static void accumulateRendererTouchEventTargetRects(Vector<IntRect>& rects, const RenderObject* renderer)
+static void accumulateRendererTouchEventTargetRects(Vector<IntRect>& rects, const RenderObject* renderer, IntRect container)
{