Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthew Podwysocki mattpodwysocki

View GitHub Profile
View download.js
var fs = require('fs'),
path = require('path'),
request = require('request'),
Rx = require('rx'),
files = [
'https://www.google.com/images/srpr/logo11w.png',
'http://rack.1.mshcdn.com/media/ZgkyMDEzLzA5LzE2L2JjL0Jpbmdsb2dvb3JhLmFkYjJkLnBuZwpwCXRodW1iCTEyMDB4OTYwMD4/996d9598/35b/Bing-logo-orange-RGB.png',
'http://assets.fontsinuse.com/static/use-media-items/15/14246/full-2048x768/52c4c6bc/Yahoo_Logo.png'
View Foo.csproj
<Project Sdk="MSBuild.Sdk.Extras/2.0.54">
<PropertyGroup>
<OutputType>Library</OutputType>
<RootNamespace>Microsoft.Azure.NotificationHubs.Client</RootNamespace>
<AssemblyName>Microsoft.Azure.NotificationHubs.Client</AssemblyName>
<!-- Target both iOS and Android -->
<TargetFrameworks>Xamarin.iOS10;MonoAndroid80;netstandard2.0</TargetFrameworks>
<Product>$(AssemblyName) ($(TargetFramework))</Product>
View readme.md

The Interactive Extensions for JavaScript (IxJS)

The Interactive Extensions for JavaScript (IxJS) is a set of methods on top of Iteratable and AsyncIterable serving as a standard library for both. Much like its push-based counterpart, the Interactive Extensions for JavaScript unifies the programming model around pull-based collections, either synchronous in the case of Iterable or asynchronous with AsyncIterable.

Iterable

Starting in ES6, the Symbol.iterator method was introduced to allow for iteration over collections such as Array, Map, Set and even ``Generator. IxJS introduces a number of creation factories and operators that operate on these Iterable` collections lazily. Each factory can be imported from `'ix/iterable'` and operators from `'ix/iterable/operators'` such as the following creating an iterable via `of` and then transforming each item using the `map` operator. You c

View NotificationHub.cs
using Foundation;
using WindowsAzure.Messaging.NotificationHubs;
namespace Microsoft.Azure.NotificationHubs
{
public partial class NotificationHub
{
private static readonly NotificationHubMessageDelegate _notificationHubMessageDelegate;
static NotificationHub()
View MSInstallationEnrichmentDelegate.h
#import <Foundation/Foundation.h>
@class MSNotificationHub;
@class MSInstallation;
@protocol MSInstallationEnrichmentDelegate <NSObject>
@optional
- (void)notificationHub:(MSNotificationHub *)notificationHub willEnrichInstallation:(MSInstallation *)installation;
View withlatestfrom.ts
import { AsyncIterableX } from '../asynciterablex';
import { OperatorAsyncFunction } from '../../interfaces';
import { wrapWithAbort } from './withabort';
import { throwIfAborted } from '../../aborterror';
import { identity } from '../../util/identity';
// eslint-disable-next-line @typescript-eslint/no-empty-function
const NEVER_PROMISE = new Promise(() => {});
type MergeResult<T> = { value: T; index: number };
View AsyncReadEx.cs
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading;
using Microsoft.Win32.SafeHandles;
namespace AsyncIO
{
internal static class NativeMethods
{
View forkjoin.ts
import { identity, identityAsync } from '../util/identity';
import { wrapWithAbort } from './operators/withabort';
// eslint-disable-next-line @typescript-eslint/no-empty-function
const NEVER_PROMISE = new Promise(() => {});
type MergeResult<T> = { value: T; index: number };
function wrapPromiseWithIndex<T>(promise: Promise<T>, index: number) {
return promise.then(value => ({ value, index })) as Promise<MergeResult<T>>;
View average-new.ts
import { identityAsync } from '../util/identity';
import { wrapWithAbort } from './operators/withabort';
import { throwIfAborted } from '../aborterror';
/**
* The options for calculating an average.
*
* @export
* @interface AverageOptions
* @template T The type of elements in the source sequence.
View never.ts
import { AsyncIterableX } from './asynciterablex';
import { throwIfAborted, AbortError } from '../aborterror';
export class NeverAsyncIterable extends AsyncIterableX<never> {
constructor() {
super();
}
async *[Symbol.asyncIterator](signal?: AbortSignal) {
throwIfAborted(signal);
You can’t perform that action at this time.