To enable Yarn for Angular CLI run the following command:
ng set --global packageManager=yarn
To revert it back to using npm use this:
ng set --global packageManager=npm
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Logging; | |
namespace JSNLogCore.Demo | |
{ | |
public class Startup | |
{ |
// https://github.com/ng-book/angular2-redux-chat/blob/master/tutorial/06b-rx-store.ts | |
import { BehaviorSubject } from 'rxjs/BehaviorSubject'; | |
import { Subject } from 'rxjs/Subject'; | |
import 'rxjs/add/operator/scan'; | |
interface Action { | |
type: string; | |
payload?: any; | |
} |
namespace WebApi.Identity.Providers | |
{ | |
using System; | |
using System.Collections.Concurrent; | |
using System.Security.Cryptography; | |
using Microsoft.IdentityModel.Tokens; | |
public static class AudiencesStore | |
{ | |
public static ConcurrentDictionary<string, Audience> AudiencesList = new ConcurrentDictionary<string, Audience>(); |
javascript: (function() { | |
var id; | |
var descr; | |
var a = document.querySelector('#ghx-detail-issue .ghx-group .ghx-key dl.ghx-detail-list dd a'); | |
if (a) { | |
/*side details*/ | |
id = a.textContent; | |
descr = document.querySelector('#ghx-detail-issue .ghx-group .ghx-detail-summary dl.ghx-detail-list dd.ghx-detail-description').textContent; | |
} else if (a = document.getElementById("key-val")) { | |
/*full page details*/ |
To enable Yarn for Angular CLI run the following command:
ng set --global packageManager=yarn
To revert it back to using npm use this:
ng set --global packageManager=npm
#requires -Version 2 -Modules posh-git | |
function Write-Theme { | |
param( | |
[bool] | |
$lastCommandFailed, | |
[string] | |
$with | |
) |
import { Injectable } from "@angular/core"; | |
import { TestBed, async, inject } from '@angular/core/testing'; | |
import { HttpModule, Http, Response, ResponseOptions, XHRBackend } from '@angular/http'; | |
import { MockBackend } from '@angular/http/testing'; | |
import { Observable } from 'rxjs/Rx'; | |
@Injectable() | |
export class FancyService { | |
protected value = 'real value'; |
namespace Owin.IpFilter | |
{ | |
using System; | |
using System.Net; | |
public static class AppBuilderExtensions | |
{ | |
public static IAppBuilder UseIpFiltering(this IAppBuilder appBuilder, Func<IPAddress, bool> rejectRequest) | |
{ | |
appBuilder.Use(typeof(IpFilterMiddleware), rejectRequest); |
# Chocolatey profile | |
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" | |
if (Test-Path($ChocolateyProfile)) { | |
Import-Module "$ChocolateyProfile" | |
} | |
function PromptX { | |
# Print the working directory: |
EDITOR: "C:\Program Files (x86)\Notepad++\notepad++.exe" -multiInst -notabbar -nosession | |
VIEWER: "C:\Program Files (x86)\Notepad++\notepad++.exe" -multiInst -notabbar -nosession -ro |