Skip to content

Instantly share code, notes, and snippets.

View cayblood's full-sized avatar

Carl Youngblood cayblood

View GitHub Profile
@cayblood
cayblood / keybase.md
Last active August 29, 2015 14:19
keybase.md

Keybase proof

I hereby claim:

  • I am cayblood on github.
  • I am carl_youngblood (https://keybase.io/carl_youngblood) on keybase.
  • I have a public key whose fingerprint is 048A 028F 9778 4D5E 5060 6D67 3F5E 2CD8 C084 BD6B

To claim this, I am signing this object:

Verifying that +carlyoungblood is my openname (Bitcoin username). https://onename.io/carlyoungblood
@cayblood
cayblood / build_commands.sh
Created November 15, 2014 01:38
how to update chrome for drone.io
export CHROME_BIN=/usr/bin/chromium-browser
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update -y
sudo apt-get install --only-upgrade chromium-browser -y
sudo start xvfb
npm -d install
node_modules/.bin/bower install
node_modules/.bin/gulp
[21:44:55] Using gulpfile ~/src/github.com/TheWorldTable/beehive/gulpfile.js
[21:44:55] Starting 'test'...
INFO [karma]: Karma v0.12.25 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 30.0.1599 (Linux)]: Connected on socket NlEDV22fMX1liH7FRCIJ with id 60108893
Chrome 30.0.1599 (Linux): Executed 0 of 3 SUCCESS (0 secs / 0 secs)
Chrome 30.0.1599 (Linux) <twt-user-badge> name should include the user's name FAILED
TypeError: Object #<HTMLUnknownElement> has no method 'async'
at Object.ComponentWrapper.flush (/home/ubuntu/src/github.com/TheWorldTable/beehive/app/test/support/polymer_setup.js:10:13)
at Object.<anonymous> (/home/ubuntu/src/github.com/TheWorldTable/beehive/app/test/integration/twt-user-badge-spec.js:20:15)
@cayblood
cayblood / my-element.html
Created November 13, 2014 23:17
how to pass object attributes to a custom element
<!-- 1st method: trying to pass attribute as JSON -->
<my-element options='{"name": "Joe Blow"}'></my-element>
<!-- 2nd method: trying to pass a global object -->
<script>
window.obj = {name: "Joe Blow"};
</script>
<my-element options="{{window.obj}}"></my-element>
@cayblood
cayblood / polymer_setup.js
Last active January 17, 2019 13:33
Adding custom elements needs to wait until after polymer-ready
// 1. Load Polymer before any code that touches the DOM.
var script = document.createElement("script");
script.src = "/base/bower_components/webcomponentsjs/webcomponents.js";
document.getElementsByTagName("head")[0].appendChild(script);
// Delay Jasmine specs until WebComponentsReady
var POLYMER_READY = false;
beforeEach(function(done) {
window.addEventListener('polymer-ready', function () {
// Karma configuration
// Generated on Wed Nov 12 2014 16:58:10 GMT-0700 (MST)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: 'app',
@cayblood
cayblood / designer.html
Created August 29, 2014 21:11
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@cayblood
cayblood / patch.diff
Last active December 29, 2015 08:09
patch for fixing duplicate parsing of coffeescript files in karma-coverage
--- preprocessor.js 2013-11-25 13:48:03.000000000 +0000
+++ preprocessor.old.js 2013-11-25 13:45:33.000000000 +0000
@@ -14,23 +14,19 @@
}
return function(content, file, done) {
- log.debug('Processing originalPath "%s" path "%s".', file.originalPath, file.path);
- log.debug(content);
- log.debug(done);
+ log.debug('Processing "%s".', file.originalPath);
@cayblood
cayblood / karma_output.txt
Created November 25, 2013 11:04
Debug output from karma run
∴ karma start karma.conf.js --log-level debug
DEBUG [plugin]: Loading karma-* from /Users/carl/Source/sandbox/testmanager_yeoman6/node_modules
DEBUG [plugin]: Loading plugin /Users/carl/Source/sandbox/testmanager_yeoman6/node_modules/karma-chrome-launcher.
DEBUG [plugin]: Loading plugin /Users/carl/Source/sandbox/testmanager_yeoman6/node_modules/karma-coffee-preprocessor.
DEBUG [plugin]: Loading plugin /Users/carl/Source/sandbox/testmanager_yeoman6/node_modules/karma-coverage.
DEBUG [plugin]: Loading plugin /Users/carl/Source/sandbox/testmanager_yeoman6/node_modules/karma-firefox-launcher.
DEBUG [plugin]: Loading plugin /Users/carl/Source/sandbox/testmanager_yeoman6/node_modules/karma-html2js-preprocessor.
DEBUG [plugin]: Loading plugin /Users/carl/Source/sandbox/testmanager_yeoman6/node_modules/karma-jasmine.
DEBUG [plugin]: Loading plugin /Users/carl/Source/sandbox/testmanager_yeoman6/node_modules/karma-junit-reporter.
DEBUG [plugin]: Loading plugin /Users/carl/Source/sandbox/testmanager_yeoman6/node_module