Skip to content

Instantly share code, notes, and snippets.

@davidfowl
davidfowl / MinimalAPIs.md
Last active March 16, 2025 16:47
Minimal APIs at a glance
@vgrem
vgrem / BatchRequest.cs
Last active May 23, 2021 20:13
BatchRequest class for msgraph-sdk-dotnet
using Microsoft.Graph;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
@jongalloway
jongalloway / aspnetcore-one-hour-makeover.md
Last active April 30, 2022 08:24
ASP.NET Core One Hour Makeover
@psignoret
psignoret / ADAL_with_vanilla_JS.md
Last active May 11, 2021 14:15
Minimal sample app using ADAL.JS and vanilla JavaScript

Using ADAL.JS with vanilla JavaScript

A minimal sample app using ADAL.JS and plain old vanilla JavaScript to obtain an access token from Azure Active Directory and use that access token to make an API request. In this case, the API we're requesting a token for is the Microsoft Graph API, which is used to retrieve the signed-in user's basic profile.

You can see (and test) this live at: https://bl.ocks.org/psignoret/raw/50e88652ae5cb6cc157c09857e3ba87f/

/* Meteor's ES6 Javascript linting configuration
*
* Documentation on rules can be found at:
* http://eslint.org/docs/rules/ <- Optionally append the rulename
*
*/
{
"parser": "babel-eslint",
"env": {
"browser": true,
@rclai
rclai / meteor-wrapAsync.js
Last active January 30, 2023 15:20
Flexible example of Meteor.wrapAsync
// Thanks @trusktr
var requestSync = Meteor.wrapAsync(function(url, callback) {
request(url, function(error, response, body) {
callback(error, {response: response, body: body})
})
});
var result = requestSync("http://google.com");
console.log(result.response, result.body);
@biilmann
biilmann / data.json
Last active May 8, 2018 20:15
Stars, Forks & Issues for Popular Static Site Generators
{"BarryMode/grav-plugin-blackhole":{"17642":{"size":96,"stargazers_count":40,"watchers_count":40,"forks_count":1,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":40,"network_count":1,"subscribers_count":6},"17643":{"size":96,"stargazers_count":40,"watchers_count":40,"forks_count":1,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":40,"network_count":1,"subscribers_count":6},"17644":{"size":96,"stargazers_count":40,"watchers_count":40,"forks_count":1,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":40,"network_count":1,"subscribers_count":6},"17645":{"size":96,"stargazers_count":40,"watchers_count":40,"forks_count":1,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":40,"network_count":1,"subscribers_count":6},"17646":{"size":96,"stargazers_count":40,"watchers_count":40,"forks_count":1,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":40,"network_count":1,"subscribers_count":6},"17647":{"size":96,"stargazers_count":40,"watchers_count":40,"forks_count":1,"open_issue