Skip to content

Instantly share code, notes, and snippets.

View Bootstrap.cs
Bootstrap.Run(config => {
config.IncludeAssemblyFor<Type>();
config.IncludeAssembly(Assembly);
config.UseAutoMapper(mapper => mapper.UseSomeOption());
config.UseAutofac();
config.LogToConsole();
};
Bootstrap.Run(config =>
config
View project.json
{
"version": "0.1-alpha-*",
"compilationOptions": {
"warningsAsErrors": true
},
"dependencies": {
"Microsoft.AspNet.Http": "0.1-alpha-*",
"Microsoft.AspNet.Mvc.Common": "",
"Microsoft.AspNet.Mvc.ModelBinding": "",
"Microsoft.AspNet.Routing": "0.1-alpha-*",
@ejsmith
ejsmith / Program.cs
Last active Aug 29, 2015
Examples of using the Exceptionless 2.0 client
View Program.cs
var client = new ExceptionlessClient(config => {
// Set your API key.
config.ApiKey = "API_KEY_HERE";
// Send events to your own free Exceptionless server install.
config.ServerUrl = "https://exceptionless.myorg.com";
// Read config settings from attributes.
config.ReadFromAttributes();
@ejsmith
ejsmith / each_with_index.js
Created Dec 11, 2012 — forked from dsci/each_with_index.js
each_with_index handlebars helper, adds an {{index}} prop accessible from within the block
View each_with_index.js
// {{#each_with_index records}}
// <li class="legend_item{{index}}"><span></span>{{Name}}</li>
// {{/each_with_index}}
Handlebars.registerHelper("each_with_index", function(array, fn) {
var buffer = "";
for (var i = 0, j = array.length; i < j; i++) {
var item = array[i];
// stick an index property onto the item, starting with 1, may make configurable later
@ejsmith
ejsmith / each_with_index.coffee
Created Dec 11, 2012 — forked from burin/each_with_index.coffee
each_with_index handlebars helper, adds an {{index}} prop accessible from within the block
View each_with_index.coffee
Handlebars.registerHelper 'each_with_index', (array, fn) ->
buffer = ''
for i in array
item = i
item.index = _i
buffer += fn(item)
buffer
@ejsmith
ejsmith / gist:6081109
Created Jul 25, 2013
Exceptionless config file samples
View gist:6081109
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="exceptionless" type="Exceptionless.Configuration.ExceptionlessSection, Exceptionless" />
</configSections>
<!-- attribute names are cases sensitive, must specify a path that you have write access to -->
<exceptionless apiKey="API_KEY_HERE" enableLogging="true" logPath="C:\log.txt" />
...
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
@ejsmith
ejsmith / gist:6082335
Last active Dec 20, 2015
Sample console app for Exceptionless
View gist:6082335
using System;
using CodeSmith.Core.Helpers;
using Exceptionless;
namespace SampleConsole {
internal class Program {
private static void Main() {
ExceptionlessClient.Current.Startup();
SendOne();
ExceptionlessClient.Current.ProcessQueue();
View gist:1b5f03f676fcd539f6cd
-------------------------------------
Session Tracking
-------------------------------------
Exceptionless can also track user sessions which enables powerful application analytics.
Session tracking can be enabled by simply adding this line to the startup of your application:
ExceptionlessClient.Default.Configuration.UseSessions()
View gist:7beddda6eb23a55aa66122ffa08572b9
log : Restoring packages for /Users/ejsmith/.vscode-insiders/extensions/ms-vscode.csharp-1.0.1-rc2/coreclr-debug/project.json...
info : Committing restore...
log : Writing lock file to disk. Path: /Users/ejsmith/.vscode-insiders/extensions/ms-vscode.csharp-1.0.1-rc2/coreclr-debug/project.lock.json
log : /Users/ejsmith/.vscode-insiders/extensions/ms-vscode.csharp-1.0.1-rc2/coreclr-debug/project.json
log : Restore completed in 918ms.
NuGet Config files used:
/Users/ejsmith/.vscode-insiders/extensions/ms-vscode.csharp-1.0.1-rc2/coreclr-debug/NuGet.config
Feeds used:
View Exceptionless.json
{
"title": "Exceptionless",
"services": {
"query": {
"list": {
"0": {
"id": 0,
"color": "#7EB26D",
"alias": "",
"pin": false,