Skip to content

Instantly share code, notes, and snippets.

View FooBarWidget's full-sized avatar

Hongli Lai FooBarWidget

View GitHub Profile
var net = require('net');
var server = net.createServer(function(socket) {
console.log('New client');
socket.on('data', function() {
console.log('data');
})
});
server.listenFD(3, 'tcp4');
var child_process = require('child_process');
var child = child_process.spawn('ls', ['.']);
child.stdin.end();
child.stdout.pipe(process.stdout);
child.stderr.pipe(process.stderr);
child.on('exit', function() {
console.log("Child exited");
});
class WhatsGoingOn
def initialize(io)
@io = io
end
def analyze
require 'rbconfig'
require 'rubygems'
print('Ruby exe', ruby_exe)
print('Ruby version', RUBY_VERSION)
# encoding: binary
require 'socket'
require 'zlib'
require 'stringio'
GZIP = false
CHUNKED = true
io = StringIO.new
io.binmode
# encoding: binary
require 'socket'
require 'zlib'
require 'stringio'
GZIP = true
CHUNKED = true
$io = StringIO.new
$io.binmode
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
From bd2e1311aa25b341be015a8d96deddeda7e88c47 Mon Sep 17 00:00:00 2001
From: "Hongli Lai (Phusion)" <hongli@phusion.nl>
Date: Sun, 15 Jan 2012 18:56:12 +0100
Subject: [PATCH] Set 'overflow: auto' on 'pre' tags so that the browser will
show horizontal scroll bars for long code examples.
---
stylesheets/asciidoc.css | 1 +
themes/flask/flask.css | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)

Introduction

Phusion Passenger can be configured in 2 ways, the "originally packaged" configuration and the "natively packaged" configuration. Depending on the configuration, Phusion Passenger locates its files (also called assets) in a different manner.

Originally packaged

This is the configuration you get when you checkout Phusion Passenger from git,

PhusionPassenger.on('request', function(headers, socket) {
var data =
"Status: 200\r\n" +
"Content-Type: text/html\r\n" +
"\r\n" +
"<h1>Hello Node.js in Passenger</h1>\n";
for (var i = 0; i < headers.keys.length; i++) {
var key = headers.keys[i];
data += key + " = " + headers[key] + "<br>\n";
}
require 'thread'
begin
require 'soap/wsdlDriver'
rescue LoadError
require 'savon'
end
class VatUtils
SERVICE_URL = 'http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl'.freeze
VAT_FORMAT = /\A([A-Z]{2})([0-9A-Za-z\+\*\.]{2,12})\Z/.freeze