Skip to content

Instantly share code, notes, and snippets.

View w0nderw0man's full-sized avatar
🐇

wonderwoman w0nderw0man

🐇
View GitHub Profile
@andrewconnell
andrewconnell / app.adal.ts
Created March 8, 2015 16:46
ADAL JS + Angular: Initializing the ADAL provider
module adalO365CorsClient {
'use strict';
export class Adal {
/**
* Configures ADAL JS with required info for the registered app in Azure AD.
*
* @param $httpProvider Angular's $httpProvider (needed by ADAL)
* @param adalSettings Settings for ADAL
* @param adalProvider ADAL JS' Angular provider.
@DanDiplo
DanDiplo / JS-LINQ.js
Last active October 31, 2024 12:33
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version):
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },
@gsans
gsans / app.ts
Created January 14, 2017 15:00
Retry a HTTP get with new configuration parameters each retry
//our root app component
import {Component, NgModule} from '@angular/core'
import {BrowserModule} from '@angular/platform-browser'
import {HttpModule, Http} from '@angular/http';
import 'rxjs/add/operator/do';
import 'rxjs/add/observable/timer';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/mergeMap';
import 'rxjs/add/operator/retryWhen';
import 'rxjs/add/operator/delay';