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
#Steps to install RVM + Ruby 1.9.2 + Rails + nginx + Passenger on CentOS (tested on v5.5) | |
# Install git and curl, if not already installed | |
sudo yum install git | |
sudo yum install curl | |
# Create the rvm group and add any users who will be using rvm to the group | |
sudo su - | |
groupadd rvm |
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('graphdat'); // require the graphdat module first, always! | |
var http = require("http"); // require the HTTP module | |
// | |
// Create the simple HTTP Server | |
// ### function createServer (requestCallback) | |
// #### @requestCallback {function} function is called on every request made. | |
// Create a Simple HTTP server. | |
// The request parameter will hold all request parameters | |
// The response parameter will hold all of the repsonse values sent to the client |
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('graphdat').config({suppress:{context_pop_automatic:true}}); // require the graphdat module first, always! | |
var fs = require("fs"); // require the Filesystem module so we can read and write files | |
var http = require("http"); // require the HTTP module | |
// | |
// ### function createServer (requestCallback) | |
// #### @requestCallback {function} function is called on every request made. | |
// | |
http.createServer(function (request, response) { |
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
#!/bin/sh | |
# get the latest | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
# download XAMPP | |
wget -Oxampp-linux-1.8.1.tar.gz http://www.apachefriends.org/download.php?xampp-linux-1.8.1.tar.gz | |
wget -Oxampp-linux-devel-1.8.1.tar.gz http://www.apachefriends.org/download.php?xampp-linux-devel-1.8.1.tar.gz |
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
#! /usr/bin/env python | |
import time | |
from wsgiref.simple_server import make_server | |
import graphdat | |
def application(environ, start_response): | |
# get the graphdat timer | |
graphdat = environ['graphdat'] |
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
var _exec = require('child_process').exec; | |
var _https = require('https'); | |
var _os = require('os'); | |
var _options = { | |
method: 'POST', | |
host: 'api.graphdat.com', | |
port: 443, | |
path: '/v1/measurements', | |
auth: 'sigurd@graphdat.com:api.896a98bf4f', |
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
var _dgram = require('dgram'); | |
var _https = require('https'); | |
// How often does the UDP server flush the message queue and send to Graphdat | |
// To keep the graphs flowing in real time, flush every 3s | |
var FLUSH_TIME = 3000; | |
// What port should the server start up on | |
var SERVER_PORT = 8900; |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: graphdat-relay | |
# Required-Start: $local_fs $remote_fs $network $named | |
# Required-Stop: $local_fs $remote_fs $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: start and stop the graphdat-relay | |
# Description: The graphdat-relay hosts plugins that send data to graphdat.com |
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
#!/bin/sh | |
## | |
## The graphdat-relay hosts and manages the graphdat plugins. | |
## Batching and sending data to graphdat.com | |
## | |
# chkconfig: 345 85 15 | |
# description: Graphdat Relay Daemon | |
# processname: graphdat-relay | |
# Source init functions |
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
#!/bin/env node | |
var exec = require('child_process').exec; | |
var http = require('http'); | |
var querystring = require('querystring'); | |
var COMMAND_TO_RUN = 'supervisorctl restart graphdat'; | |
var PATH = '/restart-server'; | |
var PORT = 8000; | |
var USERNAME = 'restart'; |
OlderNewer