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
(function(){ | |
// Calculating a PubNub Message Payload Size. | |
function calculate_payload_size( channel, message ) { | |
return encodeURIComponent( channel + JSON.stringify(message) ).length + 97; | |
} | |
})(); |
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
require 'eventmachine' | |
require 'em-http-request' | |
require 'yajl' | |
module PubSub | |
class Pubnub | |
#** | |
#* Pubnub | |
#* | |
#* Init the Pubnub Client API |
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
## MacVim Good Terminal Only Installation Guide | |
## http://www.pubnub.com/ | |
## http://twitter.com/pubnub | |
## USAGE - Copy+Paste this One-liner: | |
## | |
## bash <(curl https://raw.github.com/gist/1858026/macvim-install.sh) | |
## | |
## OR - Download this file and execute |
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
// Libraries | |
#include <math.h> | |
// Literals | |
#define THERMISTOR A0 | |
// Constants | |
// Thermistor computation | |
const float ANALOG_STEPS = 4095.0; | |
const float B_THERM = 3977.0; |
NewerOlder