Skip to content

Instantly share code, notes, and snippets.

<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='export'>
<service name='network/djbdns' type='service' version='0'>
<create_default_instance enabled='true'/>
<dependency name='dep0' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/milestone/multi-user:default'/>
</dependency>
<exec_method name='start' type='method' exec='tinydns &amp;' timeout_seconds='10'>
<method_context working_directory='/opt/local/etc/tinydns'>

Install Graphite

pkgin up
pkgin in py27-graphite-web ap22-py27-wsgi

If pkgin says the package cannot be found, do this:

#import <Foundation/Foundation.h>
@interface NSData (MD5)
- (NSString *)MD5String;
@end
#import <CommonCrypto/CommonDigest.h>
@implementation NSData (MD5)
- (NSString *)MD5String {
unsigned char result[16];
CC_MD5(self.bytes, self.length, result);

The script:

var http = require('http')
var fs = require('fs')


http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'})
  res.end("hello world")
}).listen(3000);