pkg_add http://pkgsrc.joyent.com/sdc6/2012Q1/i386/All/smtools
# note this is going to shut down the VM
sm-prepare-image
/* | |
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js | |
*/ | |
var http = require('http'), | |
fs = require('fs'), | |
util = require('util'); | |
http.createServer(function (req, res) { | |
var path = 'video.mp4'; |
{ | |
"name": "Domai.nr" | |
, "version": "1.0.0" | |
, "description": "A dead-simple way to utilize Domai.nr's JSON API" | |
, "keywords": [ | |
"domainr" | |
, "domains" | |
, "search" | |
, "domain" | |
] |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
<pre> | |
# Just Markdown, Yo. | |
So, I wanted to try to write the simplest webpage possible, [Max Ogden][1] | |
[style][3]. If you have JavaScript, you get something pretty. If not, then you | |
see [Markdown][2] text, which is fine too. | |
Another paragraph, just for fun. | |
[1]: http://maxogden.com |
From https://gist.github.com/3050224
From http://blog.smartcore.net.au/smartos-the-basics/
- Start by downloading the latest live image
- Save this file in a permanent place since your setup will need to boot from it permanently
- When you run the new VM wizard, select "Continue without disk" on the first screen of the wizard.
- Select Sun Solaris / Solaris 10 64-bit on the next screen.
// Short module explanation // Something to gather my thoughts | |
// // I think this looks cool. | |
// | |
module.exports = the_exported_function // Modules are a function. Always. | |
// | |
module.exports.extra = extra // Additional API entry points if | |
module.exports.other = other // desired. | |
// | |
var util = require('util') // Other packages from npm or core | |
var assert = require('assert') // No comma-first due to lots of |
Provided that you already have a file or stream segmenter generating your .m3u8 playlist and .ts segment files (such as the ffmpeg 'hls' muxer), this little node server will serve up those files to an HLS compatible client (e.g. Safari). If you're using node for your streaming app already, this obviates the need to serve the HLS stream from a separate web server.
loosely based on https://gist.github.com/bnerd/2011232
// loosely based on https://gist.github.com/bnerd/2011232
// requires node.js >= v0.10.0
// assumes that HLS segmenter filename base is 'out'
// and that the HLS playlist and .ts files are in the current directory
// Some bug in the code causes it to crash sometimes. | |
// Gee, that sure is annoying! Server restarts in a | |
// clean state, and spams the error log until we go | |
// in and fix it. | |
function doSomeShiz(n) { | |
shiz.expect(n); | |
for (var i = 0; i < n; i++) { | |
shiz(); | |
} |
input { | |
file { | |
path => "/var/log/icecast/access.*" | |
type => "icecast" | |
start_position=>"beginning" # this be to import old logs | |
} | |
} | |
filter { | |
if [type] == "icecast" { |