Skip to content

Instantly share code, notes, and snippets.

View codemoran's full-sized avatar

Code Moran codemoran

  • Seattle, WA
View GitHub Profile
@codemoran
codemoran / install-graphdat-php-module-on-xampp-with-64-bit-linux
Last active December 13, 2015 22:08
Install the graphdat PHP extension on XAMPP with x64 linux
#!/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
@codemoran
codemoran / simple-webserver-with-file-IO-and-graphdat.js
Last active December 11, 2015 21:28
A Simple node.js HTTP webserver with some file IO and graphdat integration
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) {
@codemoran
codemoran / simple-web-server-node-js-with-graphdat.js
Created January 29, 2013 06:40
Simple node.js HTTP webserver
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
#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