Skip to content

Instantly share code, notes, and snippets.

View tjanczuk's full-sized avatar

Tomasz Janczuk tjanczuk

View GitHub Profile
@tjanczuk
tjanczuk / test.js
Created April 4, 2013 22:05
large number of callbacks from C# to node.js
var edgetest = require('./lib/edge').func(function () {/*
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
public class Startup
{
public async Task<object> Invoke(object input)
{
Func<object, Task<object>> rowCallback = (Func<object, Task<object>>)input;
@tjanczuk
tjanczuk / zipfs.js
Created July 29, 2013 14:35
Implementation of `readFileSync` on top of a ZIP archive
var edge = require('edge');
var _createReadFileSync = edge.func(function () {/*
#r "System.IO.Compression.FileSystem.dll"
#r "System.IO.Compression.dll"
using System.Collections.Generic;
using System.IO.Compression;
using System.IO;
using System.Text;
@tjanczuk
tjanczuk / mykml
Last active December 27, 2015 10:09
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<name>KML Example file</name>
<description>Simple markers</description>
<Placemark>
<name>Marker 1</name>
<description>Some stuff to put in the first info window</description>
<!-- <Point>
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<name>KML Example file</name>
<description>Simple markers</description>
<Placemark>
<name>Marker 1</name>
<description>Some stuff to put in the first info window</description>
<!-- <Point>
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<name>Mobile Chapters Map</name>
<description><![CDATA[ <h2>Mobile Chapters Map</h2><br><a href="http://mobilechapters.com">http://mobilechapters.com</a>]]></description>
<Placemark>
<name>Jungfrau, Switzerland</name>
<Point>
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<name>Mobile Chapters Map</name>
<description><![CDATA[ <a href="http://mobilechapters.com"><img src="http://mobilechapters.com/logo_small.png"/></a> ]]></description>
<Placemark>
<name>Jungfrau, Switzerland</name>
<Point>
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<name>Mobile Chapters Map</name>
<description><![CDATA[ <a href="http://mobilechapters.com"><img src="http://mobilechapters.com/images/logo_small.png"/></a> ]]></description>
<Placemark>
<name>Jungfrau, Switzerland</name>
<Point>
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<name>Mobile Chapters Map</name>
<description><![CDATA[ <a href="http://mobilechapters.com"><img src="http://mobilechapters.com/images/logo_small.png"/></a> ]]></description>
<Placemark>
<name>Jungfrau, Switzerland</name>
<description>This is a description</description>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title> - jsFiddle demo</title>
<script type='text/javascript' src='/js/lib/dummy.js'></script>
@tjanczuk
tjanczuk / RxEdge
Created November 22, 2013 23:27
Connecting to Rx Observable in Node.js with Rx Observer in .NET within one process using Edge.js.
var edge = require('edge'); // http://tjanczuk.github.io/edge
var Rx = require('rx'); // https://github.com/Reactive-Extensions/RxJS
var createSubject = edge.func({
source: function () {/*
using System.Reactive.Linq;
using System.Reactive.Subjects;
async (dynamic input) => {
var s = new Subject<object>();