This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Instantiate the global sp object; include models & views */ | |
var sp = getSpotifyApi(1); | |
var models = sp.require("sp://import/scripts/api/models"); | |
// Get the track that is currently playing | |
var currentTrack = models.player.track; | |
// If nothing currently playing | |
if (currentTrack == null) { | |
$('#now-playing').append('No track currently playing'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> | |
<script src="/socket.io/socket.io.js"></script> | |
<script> | |
$(document).ready(function() { | |
var socket = io.connect('http://localhost'); | |
$('#button').click(function(e){ | |
socket.emit('click'); | |
e.preventDefault(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Original | |
// | |
// Markup: | |
// | |
// <button class="button">Button</button> | |
// <button class="button button-primary">Button</button> | |
// <button class="button button-danger">Button</button> | |
// | |
// Total selectors: 6 | |
// Total declarations: 19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var express = require('express'); | |
var app = express(); | |
var config = require('./config'); | |
// [...] | |
// [...] | |
var analytics = new Analytics(config.segment.writeKey, { flushAt: 1 }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using UnityEngine.VR; // we need this line here for InputTracking and VRSettings functions | |
// USAGE: put this on a thing you want the player to look at! | |
// this code will enable that thing to know if it is being looked at! | |
[RequireComponent (typeof(Collider)) ] // this thing needs a collider if we should look at it | |
public class RaycastTargetTrigger : MonoBehaviour { |