Skip to content

Instantly share code, notes, and snippets.

@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%;
@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
{
[BotAuthentication]
public class MessagesController : ApiController
{
public async Task<Message> Post([FromBody] Message message)
{
return await Conversation.SendAsync(message, () => new DocAssistDialog());
}
}
[LuisModel("nope", "nope")]
[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")
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; }
<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'),
@garunski
garunski / Microsoft.PowerShell_profile.ps1
Last active August 17, 2017 16:13
zsh git extension shortcuts for powershell
#powershell aliases for zsh git plugin
#https://github.com/robbyrussell/oh-my-zsh/wiki/Plugin:git
function gitBranchName {
$currentBranch=''
git branch | foreach {
if ($_ -match "^\* (.*)") {
$currentBranch += $matches[1]
}
}
settings = {
hideSubHeader: true,
actions: {
position: 'right',
edit: false
},
attr: {
class: 'table table-bordered table-hover table-responsive'
},
pager: {
@garunski
garunski / jenkins-helm-values.yaml
Last active September 5, 2018 20:47
Jenkins Helm Configuration
Master:
ImageTag: "2.95"
ServiceType: NodePort
ServicePort: 80
InstallPlugins:
- kubernetes:1.1.2
- workflow-aggregator:2.5
- credentials-binding:1.13
- git:3.6.4
@garunski
garunski / Jenkinsfile.local.groovy
Created December 25, 2017 23:01
Jenkinsfile.local
#!/usr/bin/groovy
podTemplate(
label: 'jenkins-pipeline',
inheritFrom: 'default',
containers: [
containerTemplate(name: 'ng', image: 'alexsuch/angular-cli:1.6.1', command: 'cat', ttyEnabled: true)
]
) {
node ('jenkins-pipeline') {