Skip to content
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
View RemoveAllStoreApps
Get-AppxPackage | Remove-AppxPackage
View get-url-shortcode.php
function get_url($atts) {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
#this automates the steps found here: http://docs.nuget.org/docs/workflows/migrating-to-automatic-package-restore
#yes, you could code golf this to about 6 characters if you wanted to
$find= @'
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
'@
foreach ($f in Get-ChildItem -Recurse -Path ".\" -Filter *.csproj | sort-object)
{
$text = Get-Content $f.FullName -Raw
View PcRepave.ps1
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
cinst 7zip
cinst audacity
cinst autohotkey_l
cinst chocolatey
cinst EthanBrown.ConEmuConfig
cinst Console2
cinst ditto
cinst fiddler
View Script-Chocolatey-Installed-Packages.ps
(ls "$env:ChocolateyInstall\lib" | select basename).basename | % {'cinst ' + ($_ -replace "\.\d+", "")} | sort -descending -unique
View Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Import Namespace="System.Threading" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
uint viewIndex = 0;
uint.TryParse(Request.QueryString["view"], out viewIndex);
views.ActiveViewIndex = (int)(viewIndex < views.Views.Count ? viewIndex : 0);
Something went wrong with that request. Please try again.