Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View nightroman's full-sized avatar

Roman Kuzmin nightroman

  • UK
View GitHub Profile
@nightroman
nightroman / Markdown.tasks.ps1
Created September 17, 2011 10:31
Invoke-Build tasks for markdown files (using MarkdownSharp)
# Invoke-Build tasks for markdown files (using MarkdownSharp)
# <https://gist.github.com/1223828>
<#
Task: Convert markdown files to HTML files (using MarkdownSharp).
Requires:
* MarkdownSharp.dll and its environment variable $env:MarkdownSharp
* NuGet install MarkdownDeep.NET
* https://github.com/toptensoftware/MarkdownDeep
@nightroman
nightroman / Markdown.tasks.ps1
Created September 18, 2011 18:59
Invoke-Build tasks for markdown files (using Markdown.pl)
# Invoke-Build tasks for markdown files (using Markdown.pl)
# <https://gist.github.com/1225405>
<#
Task: Convert markdown files to HTML files (using Markdown.pl).
Requires:
* Perl script Markdown.pl <http://daringfireball.net/projects/markdown/>
* Either perl executable in the path or the predefined alias 'perl', e.g.:
Set-Alias perl "C:\Program Files\Git\bin\perl.exe"
@nightroman
nightroman / Markdown.tasks.ps1
Last active December 24, 2021 11:48
Invoke-Build tasks for markdown files (using MarkdownDeep)
# Invoke-Build tasks for markdown files (using MarkdownDeep)
# <https://gist.github.com/1303971>
<#
Synopsis: Convert markdown files to HTML files (using MarkdownDeep).
Requires:
* MarkdownDeep.dll and its environment variable $env:MarkdownDeep
* NuGet install MarkdownDeep.NET
* https://github.com/toptensoftware/MarkdownDeep
@nightroman
nightroman / FarGit.psm1
Last active March 21, 2021 15:20
Interactive Git commands for Far Manager + FarNet.PowerShellFar
# Moved to https://github.com/nightroman/FarGit
@nightroman
nightroman / Credential.ps1
Created March 29, 2015 19:47
Get, export, and import credential
# credential file path
$CredentialPath = "$PSScriptRoot\credential.clixml"
# get and export credential
$credential = Get-Credential
$credential | Export-Clixml -LiteralPath $CredentialPath
# import credential
$credential = Import-Clixml -LiteralPath $CredentialPath
$credential

open System
open ParserLibrary
open ParserLibrary.TextInput
[<EntryPoint>]
let entry args =
let r = run (opt spaces .>>. pint .>>. (manyChars (satisfy (fun _ -> true) "any"))) " -123 Z X"
printfn "%A" r
r |> printResult

Colorer hrd with colors

hrd.hrc

Allows to highlight console color codes using their literal colors.

The change was accepted, e.g. it was in 1.0.3.11. Then it was removed in 1.0.3.12, presumably due to regeneration. Sonar was informed.

FSharpx.Extras

// sequence of steps
type Step =
| Next
| Ask1 of string ref
| Ask2 of string ref
let steps = seq {
printfn "step 0"
@nightroman
nightroman / Microsoft.VSCode_profile.ps1
Created May 19, 2017 14:59
My Microsoft.VSCode_profile.ps1
function prompt
{
#! now: last error for the color
$color = if ($?) { 10 } else { 12 }
# debug
if ($ExecutionContext.SessionState.PSVariable.GetValue('PSDebugContext')) {
return
}