Skip to content

Instantly share code, notes, and snippets.

View jaredwy's full-sized avatar

Jared Wyles jaredwy

View GitHub Profile
const fs = require("fs");
const https = require("https");
const UNKNOWN = "UNKNOWN";
function getValue(obj) {
if(!obj) {
return UNKNOWN;
}
return obj.Value;
namespace detail {
// Preconditions: T models ChannelConcept
template <typename T>
struct ChannelIsMutableConcept {
void constraints() {
c=c;
using std::swap;
swap(c,c);
}
T c;
pipeline {
agent label:'master'
stages {
stage('build') {
execute 'echo step1'
execute 'echo step2'
execute '''
echo 'Multiline'
echo 'Example'
'''
Honest Signals
Alex (Sandy) Pentland
Essentials of Programming Languages, third edition
Daniel P. Friedman and Mitchell Wand
Explaining the Computational Mind
Marcin Milkowski
@jaredwy
jaredwy / gist:5606014
Created May 18, 2013 22:51
Maybe code.
function Maybe(x) {
this.x = x;
this.isEmpty = x == null || x == undefined;
}
Maybe.prototype.map = function(f) {
//composition operator anyone?
return this.chain(function(x) {
return Maybe.of(f(x));
@jaredwy
jaredwy / gist:5605995
Last active January 9, 2017 13:10
Some notes on getting a chrome dev tools setup in a blink world.
This assumes osx. and that you have read https://developers.google.com/chrome-developer-tools/docs/contributing
1. Easiest way to run a basic server is just to use python, you should already have that installed.
2. The docs say "Set up a local web server that would serve files from WebKit/Source/WebCore/inspector on some port (8090)" this is out of date.
the correct path is /path/to/checkedout/blink/Source/devtools run python -m SimpleHTTPServer in this directory. Starts on 8000 by default change with python -m SimpleHTTPServer 8090
3. Running chrome from the command line, you want to run something like
/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --user-data-dir=/Users/wyles/blink/chromeServerProfile --remote-debugging-port=9222 --remote-debugging-frontend="http://localhost:8000/front_end/inspector.html"
Note - i found that paths are not expanded so use a full path not ~/ for your home directoy.
diff --git a/LayoutTests/fast/borders/border-radius-parsing-expected.txt b/LayoutTests/fast/borders/border-radius-parsing-expected.txt
index e4618b0..f3dac8e 100644
--- a/LayoutTests/fast/borders/border-radius-parsing-expected.txt
+++ b/LayoutTests/fast/borders/border-radius-parsing-expected.txt
@@ -1,5 +1,15 @@
Testing border-radius: 10px;
SUCCESS
+Testing border-radius: 10px 20px 30px 40px;
+SUCCESS
+Testing border-radius: 10px 20px 30px 40px 50px;
March talk outline
AMD - quick intro
What is commonjs
What is AMD
Why this is cool
Testing -
Unit testing
<div class="container">
<div class="prelude"> </div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div> <- style this element
<div class="conclusion"></div>
</div>
var elements = Array.prototype.slice.call(document.querySelectorAll('*')),
counts = {};
elements.forEach(function(i) {
if(!counts[i.tagName]) { counts[i.tagName] = 1 }
else { counts[i.tagName]++ }
i.id = i.tagName + counts[i.tagName]
});