Skip to content

Instantly share code, notes, and snippets.

View girliemac's full-sized avatar
📝
Working mostly on writing docs these days

Tomomi ❤ Imura girliemac

📝
Working mostly on writing docs these days
View GitHub Profile
@girliemac
girliemac / weather-infographic-client-connect.js
Last active March 11, 2016 20:46 — forked from shyampurk/weather-infographic
Weather Infographic Gist
function pub() {
console.log("publishing")
pubnub.publish({
channel: "wnPutTime",
message: {
'uuid': uuid
},
callback: function(m) {
console.log(m)
}
@girliemac
girliemac / 01.html
Last active October 1, 2015 00:01
PubNub Access Manager Getting Started Guide Code samples
<script src="http://cdn.pubnub.com/pubnub-[version number].js"></script>
@girliemac
girliemac / world-50m.json
Created August 7, 2015 00:03
TopoJSON World Map
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@girliemac
girliemac / 01.py
Last active January 2, 2017 00:42
[Tut] Controlling Lights with Pulse Width Modulations
import RPi.GPIO as GPIO
import sys
GPIO.setmode(GPIO.BCM)
PIN_LIVING = 4
GPIO.setup(PIN_LIVING, GPIO.OUT)
import sys
from pubnub import Pubnub
pubnub = Pubnub(publish_key='<your-pub-key>', subscribe_key='<your-sub-key>')
channel = 'hello-pi'
data = {
'username': 'Your name',
'message': 'Hello World from Pi!'
@girliemac
girliemac / 01.js
Last active August 29, 2015 14:17
Snapping LittleBits and Coding in Node.js
var five = require('johnny-five');
var board = new five.Board();
board.on('ready', function() {
led = new five.Led(5); // create a Led on pin 5
led.strobe(1000); // strobe for 1000ms
this.repl.inject({
led: led
});
});
@girliemac
girliemac / 0.txt
Last active September 1, 2016 14:47
[Blog] Creating a Chat App with Material Design using Polymer
This is a gist for my blog/tutorial, "Creating a Chat App with Material Design using Polymer"
@girliemac
girliemac / 1.html
Created December 11, 2014 00:26
Data Sync Christmas Tree Demo
<!-- Include the PubNub Library (use the beta version)-->
<script src="js/pubnub.js"></script>
@girliemac
girliemac / datasync-01.js
Created December 5, 2014 21:38
Data Sync Demo
var home = pubnub.sync('home');
@girliemac
girliemac / cordova-01.html
Last active July 2, 2018 19:07
Snippets for blog, "Sending iOS Push Notifications via APNS in JavaScript using PhoneGap and PubNub"
<script type="text/javascript" src="js/PushNotification.js"></script>
<script type="text/javascript" src="//cdn.pubnub.com/pubnub-3.7.4.min.js"></script>