Skip to content

Instantly share code, notes, and snippets.

View nightroman's full-sized avatar

Roman Kuzmin nightroman

  • UK
View GitHub Profile
@nightroman
nightroman / pandoc.css
Created March 21, 2024 12:49 — forked from killercup/pandoc.css
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
<#
.Synopsis
Downloads or updates GraphQL schema using local StrawberryShake.Tools.
https://gist.github.com/nightroman/f48f843483cd76a73f25cdd8a68fdd94
.Parameter Uri
The GraphQL service URL.
If it is omitted, .graphqlrc.json is used to get it.
.Parameter Path

This is the diff of a change: GitHub diff

This is how it looks like after Expand-Diff on comparing "a" and "b":

ib.png

# ForEach-Object -Parallel is not suitable for many input objects with
# relatively fast processing. Split-Pipeline is very suitable for this.
#requires -version 7.0
$n = $env:NUMBER_OF_PROCESSORS
$1 = {
$data | Split-Pipeline {process{ }} -Count $n
}
@nightroman
nightroman / README.md
Created January 16, 2020 15:51 — forked from atenni/README.md
How to permalink to a gist's raw file

Problem: When linking to the raw version of a gist, the link changes with each revision.

Solution:

To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/

To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]

@nightroman
nightroman / github-pandoc.css
Last active November 10, 2023 18:39 — forked from dashed/github-pandoc.css
GitHub-like CSS for pandoc standalone HTML files (perfect for HTML5 output). Based on Marked.app's GitHub CSS. Added normalize.css (v2.1.3) in the prior to GitHub css.
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
@nightroman
nightroman / Search my gists.md
Created January 7, 2020 18:49 — forked from santisbon/Search my gists.md
How to search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

How to make a gist with images in the same gist

Right aligned

Usual picture

ib.png

// F# call via interface vs. record
type IFace =
abstract Test: int -> string -> unit
type IRecord = {
Test: int -> string -> unit
}
let myTest i s =
@nightroman
nightroman / .Turtle-Steps.md
Last active July 14, 2017 17:50
Turtle 16: Batch processing using command objects with responses

16: Batch processing using command objects with responses

The description is the same as the case 9 with the last disadvantage resolved. Namely

  • Only suitable when control flow is not based on the response from a previous command.
    • Case 16 solves this issue, commands have responses.

Below is the case 9 notes: