Skip to content

Instantly share code, notes, and snippets.

View imjacobclark's full-sized avatar
:shipit:
Shipping

Jacob Clark imjacobclark

:shipit:
Shipping
View GitHub Profile
@imjacobclark
imjacobclark / config.json
Created April 5, 2013 20:45
underscore.js, node & json
{
"username" : "imjacobclark",
"email" : "[email protected]",
"website" : "http://fusionstrike.com"
}
@imjacobclark
imjacobclark / twitterStream.js
Created April 10, 2013 19:01
Returns weird issue 'problem with request: getaddrinfo ENOTFOUND'
var https = require('https');
var options = {
host: 'httpss://stream.twitter.com/1.1/statuses/filter.json?',
path: 'track=bieber',
method: 'GET',
headers: {
"Authorization": "OAuth",
"oauth_consumer_key": "",
var https = require('https');
var options = {
host: 'stream.twitter.com',
path: '/1.1/statuses/filter.json?track=bieber',
method: 'GET',
headers: {
authorization: 'OAuth oauth_consumer_key="", oauth_nonce="", oauth_signature="", oauth_signature_method="HMAC-SHA1", oauth_timestamp="", oauth_token="", oauth_version="1.0"'
}
<?php
$conn = new Mongo('localhost');
$db = $conn->tweetograph;
$collection = $db->biebertweetTest;
$cursor = $collection->find();
var myArgs = process.argv.slice(2);
console.log("Streaming for " + myArgs[0]);
var MongoClient = require('mongodb').MongoClient;
var sys = require('sys');
var OAuth = require('oauth').OAuth;
oa = new OAuth("credentials_here");
var access_token = "";
@imjacobclark
imjacobclark / Ultrasonic_Rannging.ino
Created April 24, 2013 21:48
For use with the Ultrasonic Ranging Module HC-SR04 and 3 LEDs.
/*
For use with a 4 pin Ultrasonic Distance Sensor
VCC // 5v
GND // GND
TRIG // Pin 13
ECHO // Pin 12
(c) Jacob Clark 2013 - http://fusionstrike.com
*/
@imjacobclark
imjacobclark / Ultrasonic_Ranging.ino
Created April 24, 2013 23:18
For use with the Ultrasonic Ranging Module HC-SR04 and 3 LEDs.
/*
For use with a 4 Pin Ultrasonic Ranging Sensor, see: http://www.micropik.com/PDF/HCSR04.pdf
Read about this project: http://fusionstrike.com/arduino-ultrasonic-ranging-project/
I have used Analog Pins over Digital Pins for a possible port to an ATtiny85
VCC // 5v
GND // GND
TRIG // Analog Pin 5
@imjacobclark
imjacobclark / Ultrasonic_Rannging.ino
Created April 24, 2013 23:21
For use with the Ultrasonic Ranging Module HC-SR04 and 3 LEDs.
/*
For use with a 4 Pin Ultrasonic Ranging Sensor, see: http://www.micropik.com/PDF/HCSR04.pdf
Read about this project: http://fusionstrike.com/arduino-ultrasonic-ranging-project/
I have used Analog Pins over Digital Pins for a possible port to an ATtiny85
VCC // 5v
GND // GND
TRIG // Analog Pin 5
@imjacobclark
imjacobclark / Ultrasonic_Ranging_ATtiny85.ino
Created April 26, 2013 00:01
For use with an ATtiny85, Ultrasonic Ranging Module HC-SR04 and 3 LEDs.
/*
For use with a 4 Pin Ultrasonic Ranging Sensor, see: http://www.micropik.com/PDF/HCSR04.pdf
& an ATtiny85 Microprocessor
Power can be supplied to the ATtiny85 via the Arduino
VCC // 5v (+)
GND // GND (-)
TRIG // Analog Input 3 (Pin 3)
ECHO // Analog Input 2 (Pin 4)
<head>
<title></title>
</head>
<body>
{{> main}}
{{> about}}
</body>