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);
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
<?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='application/splunkforwarder' type='service' version='0'> | |
<create_default_instance enabled='true'/> | |
<single_instance/> | |
<dependency name='network' grouping='require_all' restart_on='error' type='service'> | |
<service_fmri value='svc:/milestone/network:default'/> | |
</dependency> | |
<dependency name='filesystem' grouping='require_all' restart_on='error' type='service'> |
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
2227:~# echo "::umastat" | mdb -p 61069 | |
memory % % % % % % % % % % % % % % % % % | |
tid cached cap 8 16 32 48 64 80 96 112 128 160 192 224 256 320 384 448 | |
--- ------- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- | |
1 1.12K 0 0 2 5 4 22 41 0 9 0 13 0 0 0 0 0 0 | |
2 2.83K 0 0 27 17 0 0 0 0 7 0 0 0 0 0 0 0 46 | |
3 384 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100 0 | |
4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | |
5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | |
6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
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
#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); |
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
<?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 &' timeout_seconds='10'> | |
<method_context working_directory='/opt/local/etc/tinydns'> |
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
example openvpn config, from a site, to a Joyent zone, under SDC7: | |
---------------------------------------------------------------------------------------------------------------- | |
example config: | |
server end, in joyent cloud, pick an IP address: 10.4.4.1 | |
client ent, at home, pick an IP address: 10.4.4.2 | |
in this example, I'm calling that network a /24, or 255.255.255.0 netmask | |
-------------------- | |
on "the customer end": (my example, on my linux OpenWRT router at home) |
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
zipstream = require "zipstream" | |
fs = require "fs" | |
async = require "async" | |
class StreamingResponse | |
filename: "" | |
files: [] | |
streaming: true | |
### |
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
[root@headnode (coal) ~]# sdc-cnapi /servers/564dee43-ee2c-5303-717a-cdea366b81a7 | |
HTTP/1.1 200 OK | |
Content-Type: application/json | |
Content-Length: 3223 | |
Date: Thu, 15 Jan 2015 16:10:38 GMT | |
Server: Compute Node API | |
x-request-id: 0b667740-9cd1-11e4-8ae3-7f32772472eb | |
x-response-time: 5 | |
x-server-name: 6a9c0500-2d71-4827-a1a7-64756792726a | |
Connection: keep-alive |
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 restify = require('restify'); | |
function respond(req, res, next) { | |
res.send('hello ' + req.params.name + '\n'); | |
next(); | |
} | |
var server = restify.createServer(); | |
server.get('/hello/:name', respond); | |
server.head('/hello/:name', respond); |
OlderNewer