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
function TransformStream() { | |
var readableController, | |
writableController, | |
readable = new ReadableStream({ | |
start(controller) { | |
readableController = controller; | |
}, | |
cancel(reason) { | |
writableController.error(reason); | |
} |
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
<html> | |
<head> | |
<title>Code Qualities</title> | |
<style> | |
.grid { | |
display: grid; | |
width: 100%; | |
height: 100%; | |
grid-template-columns: repeat(4, 1fr); |
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
// This Gist was created to answer @rionmonster's tweet at http://www.twitter.com/rionmonster/status/669288962444419072 | |
// This accurately reflects the state of Glimpse 2.0.0-Beta1, however we are already looking to improve this and these | |
// will most likey change. | |
// Feedback and use cases are welcome and wanted! | |
// This is a portion of Startup.cs | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddGlimpse().RunningServerWeb(options => |
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
Func<Foo, IDictionary<string, object>> func = f => { | |
var result = new Dictionary(); | |
result.Add("one", f.Name); | |
result.Add("two", f.Id); | |
return result; | |
} |
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
class Person | |
{ | |
public Person(string name = "Joe Somebody") | |
{ | |
Name = name; | |
} | |
public string Name { get; private set; } | |
public string Greet() |
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
2013-06-25 10:36:41.1778 | DEBUG | Discovering IClientScript's in 'C:\Users\BigRed\AppData\Local\Temp\Temporary ASP.NET Files\root\a8fefafb\c6145503' and all sub directories. | | |
2013-06-25 10:36:41.5208 | DEBUG | Discovered IClientScript of type 'Glimpse.Core.ClientScript.Client' and added it to collection. | | |
2013-06-25 10:36:41.5208 | DEBUG | Discovered IClientScript of type 'Glimpse.Core.ClientScript.Data' and added it to collection. | | |
2013-06-25 10:36:41.5208 | DEBUG | Discovered IClientScript of type 'Glimpse.Core.ClientScript.Metadata' and added it to collection. | | |
2013-06-25 10:36:41.5208 | DEBUG | Discovering IInspector's in 'C:\Users\BigRed\AppData\Local\Temp\Temporary ASP.NET Files\root\a8fefafb\c6145503' and all sub directories. | | |
2013-06-25 10:36:41.5548 | DEBUG | Discovered IInspector of type 'Glimpse.Ado.Inspector.AdoInspector' and added it to collection. | | |
2013-06-25 10:36:41.5548 | DEBUG | Discovered IInspector of type 'Glimpse.EF.Inspector.EntityFrameworkInspector' and added it to collect |
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
2013-06-25 10:36:41.1778 | DEBUG | Discovering IClientScript's in 'C:\Users\BigRed\AppData\Local\Temp\Temporary ASP.NET Files\root\a8fefafb\c6145503' and all sub directories. | | |
2013-06-25 10:36:41.5208 | DEBUG | Discovered IClientScript of type 'Glimpse.Core.ClientScript.Client' and added it to collection. | | |
2013-06-25 10:36:41.5208 | DEBUG | Discovered IClientScript of type 'Glimpse.Core.ClientScript.Data' and added it to collection. | | |
2013-06-25 10:36:41.5208 | DEBUG | Discovered IClientScript of type 'Glimpse.Core.ClientScript.Metadata' and added it to collection. | | |
2013-06-25 10:36:41.5208 | DEBUG | Discovering IInspector's in 'C:\Users\BigRed\AppData\Local\Temp\Temporary ASP.NET Files\root\a8fefafb\c6145503' and all sub directories. | | |
2013-06-25 10:36:41.5548 | DEBUG | Discovered IInspector of type 'Glimpse.Ado.Inspector.AdoInspector' and added it to collection. | | |
2013-06-25 10:36:41.5548 | DEBUG | Discovered IInspector of type 'Glimpse.EF.Inspector.EntityFrameworkInspector' and added it to collect |
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
<!DOCTYPE html> | |
<!-- Helpful things to keep in your <head/> | |
// Brian Blakely, 360i | |
// http://twitter.com/brianblakely/ | |
--> | |
<head> | |
<!-- IE10 Plug-in setting | |
Including this tag will force plug-in-less "Metro IE10" to prompt the user to open the URL in "Desktop IE10" which supports plug-ins. |
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 ActionResult ActionMethod() | |
{ | |
var data = GetDataSomehow(); | |
return new JsonpResult(data); | |
//constructor overload for overriding callback function | |
//return new JsonpResult(data, "callback function"); | |
} |
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
$(function () { | |
$.ajax({ | |
dataType: 'jsonp', | |
url: 'http://example.com/JSONP/API/', | |
success: function (data) { | |
console.log(data); | |
} | |
}); | |
}); |
NewerOlder