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
npm list | |
npm install ws | |
npm install monitor-forever | |
node node_server_forever.js |
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
import spacebrew.*; | |
import processing.serial.*; | |
String server = "sandbox.spacebrew.cc"; | |
String name = "Processing_CLIENT; | |
String description = "Testing from processing "; | |
// TAKEN FROM THE SPACEBREW TUTORIAL - JUST MODIFIED TO SIMPLIFY W/O ARDUINO | |
Spacebrew spacebrewConnection; // Spacebrew connection object |
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
import RPi.GPIO as GPIO | |
from twilio.rest import TwilioRestClient | |
import time | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(25,GPIO.IN,pull_up_down=GPIO.PUD_DOWN) | |
try: | |
GPIO.wait_for_edge(25,GPIO.RISING) | |
print("button pressed") | |
ACCOUNT_SID = "[account id]" |
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
# Remove SASS cache files # | |
wp-content/themes/{themename}/.sass-cache/* | |
# No need to add the upgrade folder to the repo # | |
wp-content/upgrade/* | |
# No need to add the uploads folder to the repo # | |
wp-content/uploads/* | |
# No need to add the plugins folder to the repo # |
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
// Initialize a git repo | |
git init | |
touch README.md | |
git add README.md | |
git commit -m "Initial commit." | |
//Set up the WordPress module - notice we are putting it in a folder | |
git submodule add git://github.com/WordPress/WordPress.git wordpress | |
git commit -m "Adding WP as a submodule" | |
// navigate to the wordpress folder - notice to deal with the submodule you need to work in it |
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
import processing.serial.*; | |
import cc.arduino.*; | |
import ddf.minim.*; | |
import processing.video.*; | |
// Number of columns and rows in our system | |
int cols, rows; | |
// Variable to hold onto Capture object | |
Capture video; | |
PImage output; |
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
int pressurePin = A0; // select the input pin for the potentiometer | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
// read the value from the sensor: | |
pressure = analogRead(pressurePin); | |
Serial.println(pressure); |
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
#include "lib1.h" | |
double pressure = 0.0; | |
// This routine runs only once upon reset | |
void setup() { | |
// we want to save this variable to use with the rest api | |
Spark.variable("pressure", &pressure, DOUBLE); | |
pinMode(A0, INPUT); |
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 System.Net; | |
using System.IO; | |
public class Plane : MonoBehaviour | |
{ | |
public Vector2 jumpForce = new Vector2 (0, 300); | |
private WWW www; | |
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
setInterval(function(){ | |
$.ajax("https://api.spark.io/v1/devices/{YOUR_SPARK_ID}/pressure?access_token={YOUR_ACCESS_TOKEN}") | |
.done(function(obj){ | |
if(obj.result < 10){ | |
scene.particleSystem.start(); | |
}else{ | |
scene.particleSystem.stop(); | |
} | |
}) |