Skip to content

Instantly share code, notes, and snippets.

Ry Dahl ry

Block or report user

Report or block ry

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ry
ry / SAP_CLA
Created Jan 12, 2018 — forked from CLAassistant/SAP_CLA
SAP Individual Contributor License Agreement
View SAP_CLA
###SAP Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by SAP SE or its affiliates (“SAP”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to SAP in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact opensource@sap.com.
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
**Copyright License.** You hereby grant, and agree to grant, to SAP a non-exclusive, perpetual, irrevocable, worldwid
View node-0.8.0.md

I am thrilled to announce the arrival of a new stable version of Node.js.

Compared with the v0.6 releases of Node, this release brings significant improvements in many key performance metrics, as well as cleanup in several core APIs, and the addition of new debugging features.

tl;dr

View rabbitmq-announcer.xml
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="manifest" name="rabbitmq-announcer">
<service name="site/rabbitmq-announcer" type="service" version="@@VERSION@@">
<create_default_instance enabled="true"/>
<single_instance/>
<dependency name="network" grouping="require_all" restart_on="error" type="service">
View gist:421874
// Copyright 2009 Ryan Dahl <ry@tinyclouds.org>
#include <v8.h>
#include <node.h>
#include <node_os.h>
#include <sys/types.h>
#include <sys/time.h>
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
View gist:407229
// doc, name, attrs, content, callback
v8::Handle<v8::Value>
XmlElement::New(const v8::Arguments& args) {
v8::HandleScope scope;
// was created by BUILD_NODE
if (args.Length() == 0 || args[0]->StrictEquals(v8::Null()))
return scope.Close(args.This());
XmlDocument *document = LibXmlObj::Unwrap<XmlDocument>(args[0]->ToObject());
v8::String::Utf8Value name(args[1]->ToString());
View fab-promise.js
function loadConfig() {
return posix.cat('config.json')(function(error, config) {
return posix.cat('configuration.json')
})(function(error, config) {
if (error) {
sys.puts("Can't load config");
// if there is an error then it has to be returned
// otherwise the error is thrown
return error;
}
View fab-promise.js
function loadConfig() {
return posix
.cat('config.json')
(true, function(config) {
return (config instanceof Error)
? posix.cat('configuration.json')
: config;
})
(function() {
return JSON.parse(config);
View gist:249750
db.query('SELECT 1')
('result1', function(result1) {
return db.query('SELECT 2');
})
('result2', function(result2) {
return db.query('SELECT 3');
})
('result3')
.addCallback(function(results) {
p(results); // == {result1: result1, result2: result2, result3: result}
You can’t perform that action at this time.