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 class TargetLinkExtension : IMarkdownExtension | |
{ | |
public void Setup(MarkdownPipelineBuilder pipeline) | |
{ | |
} | |
public void Setup(MarkdownPipeline pipeline, IMarkdownRenderer renderer) | |
{ | |
var htmlRenderer = renderer as HtmlRenderer; |
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 {createSelector} from 'reselect'; | |
const hasPerformanceApi = | |
window && | |
window.performance && | |
window.performance.measure && | |
window.performance.mark; | |
const createFuncWithMark = (name, callback) => (...args) => { | |
const startMark = `${name}-Startmark`; |
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
const(\s?)(\w*)(\s?)=(\s)createSelector\( | |
const$1$2$3=$4createMarkedSelector('$2', |
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
# Custom bash prompt via kirsle.net/wizards/ps1.html | |
export PS1="\[$(tput bold)\]\$?|\[$(tput setaf 1)\][\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \[$(tput setaf 5)\]\W\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]" |
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
#region Apache License | |
// | |
// Licensed to the Apache Software Foundation (ASF) under one or more | |
// contributor license agreements. See the NOTICE file distributed with | |
// this work for additional information regarding copyright ownership. | |
// The ASF licenses this file to you under the Apache License, Version 2.0 | |
// (the "License"); you may not use this file except in compliance with | |
// the License. You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 |
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 Microsoft.Build.Evaluation.Project; | |
using System.IO; | |
void Main() | |
{ | |
var files = Directory.GetFiles(@"c:\projects\projectRoot\", "*.csproj", SearchOption.AllDirectories); | |
foreach (var file in files) | |
{ | |
var project = new Project(file); | |
project.SetProperty("LangVersion", "6"); | |
project.Save(); |
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
string input = "some input"; | |
int output; | |
if(int.TryParse(input, out output)) | |
{ | |
//it parsed it | |
// output now equals the value | |
} | |
else{ | |
//it did not parse it |
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
static void Main(string[] args) | |
{ | |
var t = new Amazon.EC2.AmazonEC2Client("key", "scrt", Amazon.RegionEndpoint.USEast1); | |
string nextToken = null; | |
var lst = new List<Instance>(); | |
do | |
{ | |
var instances = t.DescribeInstances(new Amazon.EC2.Model.DescribeInstancesRequest() { NextToken = nextToken }); | |
nextToken = instances.NextToken; | |
lst.AddRange(instances.Reservations.SelectMany(a=>a.Instances).Where(a=>a.Tags.Any(b=>b.Key == "key" && b.Value == "value"))); |
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
set-executionpolicy unrestricted -Force | |
dism /Online /Enable-Feature:Microsoft-Hyper-V /All | |
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco install -y docker docker-machine docker-compose |
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
#!/bin/bash | |
curl -sSL https://get.docker.com/ | sh | |
curl -L "https://github.com/docker/compose/releases/download/1.9.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose |