This file contains hidden or 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 http = require('http'); | |
var url = require('url'); | |
http.createServer(function(request, response) { | |
console.log(request.url); | |
var options = url.parse(request.url); | |
options.method = request.method; | |
options.headers = request.headers; | |
var req = http.request(options, function(res){ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
/* | |
Experimental generic http interface for Codename Orleans | |
To use, POST to this url: | |
POST /grainType/grainId/grainMethod | |
[arg1, arg2] | |
grain response will be in the http response body |
This file contains hidden or 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
all: clean lint test build | |
clean: | |
rm -f *.min.js | |
lint: clean | |
jshint --config jshintconfig.json $(filter-out $(wildcard *.min.js), $(wildcard *.js)) | |
test: | |
mocha |
This file contains hidden or 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 edge = require('edge'); | |
var play = edge.func(function () {/* | |
async (input) => { | |
(new System.Media.SoundPlayer(input as string)).Play(); | |
return input; | |
} | |
*/}); | |
play("pacman_beginning.wav", function (error, result) { |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
This file contains hidden or 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
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using Orleans.Host.SiloHost; | |
using System; | |
using System.Diagnostics; | |
using System.Threading.Tasks; | |
namespace Tests | |
{ | |
[TestClass] | |
public class GrainTests |
This file contains hidden or 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
static async Task<bool> Yo() | |
{ | |
using (var client = new HttpClient()) | |
using (var mfdc = new MultipartFormDataContent()) | |
{ | |
mfdc.Add(new StringContent("YOUR_API_TOKEN"), name: "api_token"); | |
var response = await client.PostAsync("http://api.justyo.co/yoall/", mfdc); | |
return response.IsSuccessStatusCode; | |
} | |
} |