This file contains hidden or 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
APACHE BENCHMARK TEST WITH HAPROXY | |
===================================== | |
1250 | |
---- | |
Concurrency Level: 125 | |
Time taken for tests: 10.119639 seconds | |
Complete requests: 1250 | |
Failed requests: 0 |
This file contains hidden or 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
APACHE BENCHMARK TEST VS SINGLE BOX | |
========================================== | |
1250 | |
---- | |
Concurrency Level: 125 | |
Time taken for tests: 5.560109 seconds | |
Complete requests: 1250 | |
Failed requests: 0 | |
Write errors: 0 |
This file contains hidden or 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/bash | |
echo "Starting with 'Hello World!'" | |
# WRITE FUGUE FILE | |
echo "var fugue = require('fugue') | |
var path = require('path') | |
var sys = require('sys') |
This file contains hidden or 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
"use strict"; // strict mode doesn't work, but it WOULD need to come in at the top of the file | |
// http://www.slideshare.net/kangax/say-hello-to-ecmascript-5 | |
// http://davidflanagan.com/Talks/es5/slides.html | |
// http://www.slideshare.net/BrendanEich/metaprog-5303821#text-version | |
var sys = require("sys") | |
This file contains hidden or 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
Showcard.prototype.ensureHasUrls = function(cb) { | |
// If they have urls in the corresponding meta record, | |
// then add them. Otherwise, grab them from google and save | |
// the meta object for later. | |
// For now, lazily aggregate the urls. Never do this automatically when finding a showcard | |
// it needs to be clear when you are joining/proxying data, and callers need control | |
// Ignore google API Abuse errors so it can still finish |
This file contains hidden or 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
<?php | |
mysql_connect("localhost","root","") or die(mysql_error()); | |
mysql_select_db("date_ideas") or die(mysql_error()); | |
$title=$_POST['title']; | |
$desc=$_POST['desc']; | |
$submit="INSERT INTO ideas (title, desc) VALUES ('$title','$desc');"; | |
echo ("<p>Query: $submit</p>"); |
This file contains hidden or 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
HTTP/1.1 200 OK | |
content-length: 3052 | |
content-type: application/xml | |
date: Sat, 19 Mar 2011 16:18:38 GMT | |
etag: "60030455" | |
server: Noelios-Restlet-Engine/1.1.rc2 | |
vary: Accept-Charset,Accept-Encoding,Accept-Language,Accept | |
access-control-allow-credentials: true | |
access-control-allow-methods: GET, POST | |
x-mashery-responder: proxyworker-i-5b380930.mashery.com |
This file contains hidden or 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
db.events.drop() | |
db.events.save({_id: "1", venue: "v1", act: "a1", dt: "2011-03-24 00:00"}) | |
db.events.save({_id: "2", venue: "v1", act: "a1", dt: "2011-03-25 00:00"}) | |
// the same act, playing at two venues at the same time? | |
db.events.save({_id: "3", venue: "v2", act: "a1", dt: "2011-03-23 00:00"}) |
This file contains hidden or 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
exports.createServer = function() { | |
var http = require('http'); | |
return http.createServer(function (req, res) { | |
console.log("req") | |
res.writeHead(200, {'Content-Type': 'text/plain', 'Cache-Control': 'no-cache'}); | |
res.end('Hello World\n'); | |
}) | |
} | |
if (module == require.main) { |
This file contains hidden or 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
# testing nginx as a balancer | |
user nginx nginx; | |
worker_processes 4; | |
worker_rlimit_nofile 30000; | |
error_log /var/log/nginx/error.log; | |
#error_log /var/log/nginx/error.log notice; | |
#error_log /var/log/nginx/error.log info; |