Skip to content

Instantly share code, notes, and snippets.

@whichlight
whichlight / stream-intro.md
Last active August 29, 2015 13:57
Getting started with Stream

Quick Intro to Embedly Stream

This will be a few quick steps to get started with Stream. Learn more about Stream here.

A few details on using Stream

Note that Stream is free for non commercial purposes, but if you want to use it in something you sell, email support@embed.ly and we'll work something out. We want to encourage awesome projects with Stream, but please use good judgement. The data from Stream may not be redistributed, i.e. you can't reshare Stream as it is.

Get a key

@whichlight
whichlight / embed-button.html
Created March 13, 2014 15:42
html for the embed button when you include platform js
<a class="embedly-button" href="http://embed.ly/code">Embed</a>
@whichlight
whichlight / link-and-card.html
Created March 13, 2014 15:27
With and without the embedly-card class
<script src="//cdn.embedly.com/widgets/platform.js"></script>
@whichlight
whichlight / button-snippet.html
Last active August 29, 2015 13:57
including button snippet
<section class="post-controls">
<ul>
<!-- Here is the added Embedly button -->
<li class="embedly-control">
<a class="embed-button" href="javascript:;" onclick='embedly.modal({url: "{Permalink}"})'><img src="http://cdn.embedly.com/libs/images/0.0.1/embed_icon_black_15_16.png"></a>
</li>
<!-- Here are the other share buttons -->
<li class="share-control">
@whichlight
whichlight / platform-snippet.html
Last active August 29, 2015 13:57
including platform snippet
<script src="http://static.tumblr.com/vr9xgox/Azhmnml1q/jquery.masonry.min.js"></script>
<script src="http://static.tumblr.com/vr9xgox/q6Bmzia9p/main-min.js"></script>
<!-- This is the added Embedly platform.js script -->
<script src="//cdn.embedly.com/widgets/platform.js"></script>
<!-- Google Analytics -->
{block:IfGoogleAnalyticsID}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
@whichlight
whichlight / designing_playfulness.txt
Created February 5, 2014 18:39
talk at istanbul hackerspace
designing playfulness with interactive art
Kawandeep Virdee
@whichlight
blog.whichlight.com
whichlight@gmail.com
http://whichlight.github.io/robotsconf-talk/#/3
http://newamericanpublicart.com/neodya2/index.html
@whichlight
whichlight / gist:8451255
Created January 16, 2014 07:56
button example with betahaus
var button = "&lt;a class=&quot;embedly-button&quot; href=&quot;http://embed.ly/code&quot; data-lang=&quot;Auto (Determined by Browser)&quot;&gt;Embed&lt;/a&gt;<br/>&lt;script&gt;!function(a){var b=&quot;embedly-platform&quot;,c=&quot;script&quot;;if(!a.getElementById(b)){var d=a.createElement(c);d.id=b,d.src=(&quot;https:&quot;===document.location.protocol?&quot;https&quot;:&quot;http&quot;)+&quot;://cdn.embedly.com/widgets/platform.js&quot;;var e=document.getElementsByTagName(c)[0];e.parentNode.insertBefore(d,e)}}(document);&lt;/script&gt;"; var $button = jQuery('<div/>').html(button).text(); jQuery(".post-content").append($button)
@whichlight
whichlight / gist:7418447
Created November 11, 2013 18:59
RGB 32x32 LED grid programming
// colorwheel demo for RGBmatrixPanel library.
// Renders a nice circle of hues on a 32x32 RGB LED matrix.
#include <Adafruit_GFX.h> // Core graphics library
#include <RGBmatrixPanel.h> // Hardware-specific library
// If your 32x32 matrix has the SINGLE HEADER input,
// use this pinout:
#define CLK 8 // MUST be on PORTB!
#define OE 9
@whichlight
whichlight / gist:7416081
Created November 11, 2013 16:33
serial reading arduino, semicolon between each measurement (like newlines) and comma between vals of each measurement. ex: x1,y1,c1;x2,y2,c2
if (Serial.available() > 0) {
// get incoming byte:
byteRead = Serial.read();
/*Listen for a comma which equals byte code # 44 */
if(byteRead==44){
data[counter] = String(serialDataIn);
serialDataIn = String("");
counter = counter + 1;
}
else if(byteRead == 59){