Skip to content

Instantly share code, notes, and snippets.

View jaredwy's full-sized avatar

Jared Wyles jaredwy

View GitHub Profile
@jaredwy
jaredwy / laksatime.js
Created May 13, 2011 05:34
Refactor me
(function(){
var options = {
"yesMessage": "YES!",
"noMessage": "No",
"target": "#isitlaksatime",
"day": 5, // 5 for friday
"hour": 12 // 12 for noon!
};
@jaredwy
jaredwy / gist:979939
Created May 19, 2011 00:51 — forked from i386/gist:979935
Bamboo Task in Javascript
require_component('processService');
var task = {
execute: function(context) {
var logger = context.buildLogger;
logger.addLogEntry("Hello World!");
return {
taskState: "successful",
resultData: {},
taskIdentifier: context;
@jaredwy
jaredwy / update.scala
Created July 12, 2011 07:24
match the 1
case class X(x: Int, y :Int)
//this is what drives the mower
private def doSomething(delta): X = x match {
case X(x,1) => update(x,1 + delta)
case _ => X(1,2)
}
# Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
# reserved. Use of this source code is governed by a BSD-style license that
# can be found in the LICENSE file.
from optparse import OptionParser
from subprocess import Popen, PIPE, STDOUT
from tempfile import mktemp
import os
import shlex
import shutil
@jaredwy
jaredwy / gist:4120970
Created November 20, 2012 20:47
refactor idea
//test.js
export = {
//rename this to hello
a:function(),
c:function();
d:function();
}
//some other file
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]
});
<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>
March talk outline
AMD - quick intro
What is commonjs
What is AMD
Why this is cool
Testing -
Unit testing
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;
@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.