Skip to content

Instantly share code, notes, and snippets.

<script type="text/javascript">
var myApp = angular.module('myApp', ['ng-admin']);
myApp.config(['NgAdminConfigurationProvider', function(NgAdminConfigurationProvider) {
var nga = NgAdminConfigurationProvider;
// create an admin application
var admin = nga.application('Documentation Assistant Bot Admin').baseApiUrl('/api/');;
var lodash = nga.entity('lodashes');
lodash.listView().fields([
nga.field('Id'),
namespace Admin.Models
{
public class Lodash
{
public int Id { get; set; }
public string FunctionName { get; set; }
public string ClassName { get; set; }
public string Example { get; set; }
public string Documentation { get; set; }
public string Arguments { get; set; }
[LuisIntent("SearchLibraryForFunctionInClass")]
public async Task SearchLibraryForFunctionInClass(IDialogContext context, LuisResult result)
{
var message = "Could not find any documentation. Sorry try a different search.";
if (result.Entities.First(i => i.Type == "library").Entity == "lodash")
{
if (result.Entities.First(i => i.Type == "class").Entity == "array")
{
if (result.Entities.First(i => i.Type == "function").Entity == "chunk")
[BotAuthentication]
public class MessagesController : ApiController
{
public async Task<Message> Post([FromBody] Message message)
{
return await Conversation.SendAsync(message, () => new DocAssistDialog());
}
}
[LuisModel("nope", "nope")]
@garunski
garunski / gist:cf8ce3616fd904774c1b
Created January 8, 2015 16:09
Convert JS files to TS files
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading;
using Microsoft.Build.Evaluation;
namespace convertjstots
{
@garunski
garunski / dabblet.css
Created December 16, 2011 20:57
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;