For my own sanity ;) Scraped from a variety of places, including: http://stackoverflow.com/questions/14130560/nodejs-udp-multicast-how-to?utm_medium=twitter&utm_source=twitterfeed | |
!Server | |
var news = [ | |
"Borussia Dortmund wins German championship", | |
"Tornado warning for the Bay Area", | |
"More rain for the weekend", | |
"Android tablets take over the world", | |
"iPad2 sold out", |
# Version key/value should be on his own line | |
PACKAGE_VERSION=$(cat package.json \ | |
| grep version \ | |
| head -1 \ | |
| awk -F: '{ print $2 }' \ | |
| sed 's/[",]//g') | |
echo $PACKAGE_VERSION |
/*! | |
* Copyright 2015 Google Inc. All rights reserved. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
You want a script that does a local compile to e.g. an out/
directory. Let's call this compile.sh
for our purposes, but for your project it might be npm build
or gulp make-docs
or anything similar.
The out/
directory should contain everything you want deployed to gh-pages
. That almost always includes an index.html
.
Using Upperdog Interactive’s CSS Twitter logo as reference, and I wrote some circle-circle intersection code (a.k.a. math) to specify the Twitter logo as sequence of elliptical arc segments. There are other versions of the Twitter logo in SVG, but as best I can tell, they use cubic Béziers. I found it mathematically unsettling to use Béziers when circular arcs would suffice.
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="import" href="../components/polymer/polymer.html"> | |
<template id="test-element"> | |
Hello, <content></content>. | |
</template> |
#!/bin/sh -e | |
#Define our target device | |
export TARGET_ARCH="-march=armv7-a" | |
export TARGET_TUNE="-mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb" | |
#Define the cross compilators on your system | |
export AR="arm-linux-gnueabi-ar" | |
export CC="arm-linux-gnueabi-gcc" | |
export CXX="arm-linux-gnueabi-g++" |
if (window.addEventListener) { | |
window.addEventListener("storage", onStorage, false); | |
} else { | |
window.attachEvent("onstorage", onStorage); | |
}; | |
var onStorage = function(data) { | |
// Receive changes in the localStorage | |
} |
/** | |
* simple JSONP support | |
* | |
* JSONP.get('https://api.github.com/gists/1431613', function (data) { console.log(data); }); | |
* JSONP.get('https://api.github.com/gists/1431613', {}, function (data) { console.log(data); }); | |
* | |
* gist: https://gist.github.com/gists/1431613 | |
*/ | |
var JSONP = (function (document) { | |
var requests = 0, |