This repo's location has changed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class WebApiConfig | |
{ | |
public static void Register(HttpConfiguration config) | |
{ | |
config.Routes.MapHttpRoute( | |
name: "DefaultApi", | |
routeTemplate: "api/{controller}/{id}", | |
defaults: new { id = RouteParameter.Optional } | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Microsoft.Owin; | |
using NLog; // Using NLog in this example | |
namespace com.github.gist.coenm | |
{ | |
public static class LogRequestResponseHelper | |
{ | |
public static void LogDebugResponse(Logger logger, IOwinResponse response) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Extensions of <see cref="JObject"/> | |
/// </summary> | |
public static class JObjectExtensions | |
{ | |
/// <summary> | |
/// Gets the <see cref="JArray"/>. | |
/// </summary> | |
/// <param name="jsonObject">The json object.</param> | |
/// <param name="arrayPropertyName">Name of the array property.</param> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$vsixPath = "$($env:USERPROFILE)\sqlite-wp81-winrt-3081002.vsix" | |
(New-Object Net.WebClient).DownloadFile('https://visualstudiogallery.msdn.microsoft.com/5d97faf6-39e3-4048-a0bc-adde2af75d1b/file/132406/15/sqlite-wp81-winrt-3081002.vsix', $vsixPath) | |
"`"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\VSIXInstaller.exe`" /q /a $vsixPath" | out-file ".\install-vsix.cmd" -Encoding ASCII | |
& .\install-vsix.cmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "web-framework", | |
"description": "Transforms a given application state into an HTML or DOM representation. Additionally, it is also often concerned with request routing, data fetching and persistence, change propagation, input validation, user session management and build optimizations." | |
}, | |
{ | |
"name": "testing-framework", | |
"description": "Provides a CLI and an API to run software tests and report results." | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "freeCodeCamp/freeCodeCamp", | |
"description": "The https://freeCodeCamp.com open source codebase and curriculum. Learn to code and help nonprofits.", | |
"stars": 266038, | |
"type": "other" | |
}, | |
{ | |
"name": "twbs/bootstrap", | |
"description": "The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// respond to a Bootstrap carousel "slid" event | |
$('#my-carousel').on('slid', '.carousel', function() { | |
// first, since we're outside AngularJS, we need to grab | |
// the AngularJS scope that this element resides in | |
var scope = angular.element(this).scope(); | |
// next, we find the active item in the carousel, and grab | |
// some data-* from it | |
var active = $(this).find('.active'); | |
var description = active.attr('data-description'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Import all | |
import Rx from "rxjs/Rx"; | |
Rx.Observable | |
.interval(200) | |
.take(9) | |
.map(x => x + "!!!") | |
.bufferCount(2) | |
.subscribe(::console.log); |
OlderNewer