Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
using System.Reactive.Subjects;
namespace PubSub
{
class Program
const getAll = <T>(url: string, map: (item: any) => T): Promise<Result> => {
return fetch(url, {
method: Verb.GET,
headers: headers,
credentials: "include"
})
.then(handleResponse)
.then(json => {
let mapped = json.map((item: any): T => {
import { powerBIResource, aadRedirectUrlPostFix } from "./config";
import * as AuthenticationContext from "adal-angular";
import { store } from "../store";
import { aadAuthenticated, failed } from "containers/Root/actions";
const getAuthContext = (clientId: string): AuthenticationContext => {
return new AuthenticationContext({
clientId: clientId,
cacheLocation: "localStorage",
redirectUri: window.location.origin + aadRedirectUrlPostFix
import {
createStore,
combineReducers,
applyMiddleware,
compose,
Store as ReduxStore
} from "redux";
import {
routerReducer,
routerMiddleware as createRouterMiddleware
param(
[parameter(Mandatory)]
[string]$versionNumber="x.x.x"
)
$path = "appsettings.versioning.json"
$settings=(Get-Content -Raw $path| ConvertFrom-Json)
$settings.Versioning.VersionNumber= $versionNumber
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="index.html" />
</files>
</defaultDocument>
<rewrite>
{
"name": "df",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"body-parser": "^1.18.2",
"cors": "^2.8.4",
"express": "^4.16.2",
"request": "^2.83.0"
import * as React from "react";
import { scaleLinear, ScaleLinear } from "d3-scale";
import { select, Selection } from "d3-selection";
import { Line, line } from "d3-shape";
import { axisBottom, axisLeft } from "d3-axis";
createScaleY = (minDepth: number, maxDepth: number) => {
const path = require("path");
const webpack = require("webpack");
const fs = require("fs");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const appDirectory = fs.realpathSync(process.cwd());
const packages = path.join(appDirectory, "node_modules");
const buildPath = path.join(appDirectory, "./dist");
const nodeEnv = process.env.NODE_ENV || "development";
const configPath = path.join(appDirectory, "config");
import * as React from "react"
import {select} from "d3-selection"
import   {hsl}from "d3-color";
import {pie} from "d3"
import Grid from "./Grid";
type Props ={
}