View BlogImportController.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Net.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Microsoft.AspNetCore.Diagnostics;
using cloudscribe.SimpleContent.Models;
using System.Xml.Linq;
View electron-app-not-launching.txt
Microsoft Windows [Version 10.0.14986]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\Users\jonga\AppData\Local\hyper\app-1.0.1>node -v
v7.3.0
C:\Users\jonga\AppData\Local\hyper\app-1.0.1>npm -v
3.10.10
C:\Users\jonga\AppData\Local\hyper\app-1.0.1>hyper
View fix-self-closing-anchor-tags-recursive.ps1
$find = '<a (name|id)="(\w*)" />'
$replace = '<a $1="$2"></a>'
$match = 'README.md'
gci -r -i $match | % {
(gc $_ ) | % { $_ -replace $find, $replace } | sc $_
}
View links.md
View timegetter.cs
public class CurrentTimeGetter
{
private volatile Holder _holder;
const String rfc1123Pattern = "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'";
public string GetCurrentTimeAsString()
{
DateTime now = DateTime.UtcNow;
Holder currentHolder = _holder;
View index.html
<h2>Testing custom link renderer with Marked.js</h2>
<div class="container">
<div class="row">
<div class="col-md-6">
<textarea class="form-control" id=input rows="30">
Enter Markdown here. This should append /readme.htm to any relative link to a path (not a document).
* [Self anchor link](#do-not-change-me)
* [Another doc anchor](/chocolate/#change-me)
* [Another doc with path](/chocolate/cake.htm)
View markdown-deep-delegate-hooks.ps1
md.PrepareImage = delegate(MarkdownDeep.HtmlTag tag, bool TitledImage)
{
//Compress PNG
string relPath = tag.attributes["src"].Replace('/', '\\').Replace("?raw=true", "");
string path = Path.Combine(file.DirectoryName, relPath);
Console.WriteLine("\tProcessing image: {0}", path);
System.Drawing.Bitmap img = (Bitmap)Bitmap.FromFile(path);
var quant = new nQuant.WuQuantizer();
var ms = new MemoryStream();
View recursive-nuget-package-restore.ps1
get-childitem . -include *.sln -recurse | foreach ($_) { nuget restore $_.FullName -verbosity detailed}
get-childitem . -include *.png -recurse | foreach ($_) { pngout "$_"}
View MarkdownPackager.cs
using Strike.IE;
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
namespace TrainingKitPackager
{
class Program