How to implement a custom search for Hugo usig Gruntjs and Lunrjs.
Updated from original to allow for url page changes, more detailed install instructions.
See More at www.hiller.pro
Thanks to sebz for the initial writeup!
Requires Nodejs
import fs = require('fs'); | |
import sql = require('sql.js'); | |
export class Security { | |
private db; | |
private history: dayRecord[]; | |
constructor( | |
private symbol: string, |
require('source-map-support').install({ | |
environment: 'node' | |
}); | |
/** | |
* eLog - displays calling line number & message & dumps vars as pretty json string | |
* @param {string} msg - string to display in log message | |
* @param {any} dispVars - any number of variables (ellipsis , aka Rest parameters) to dump | |
* {@link https://github.com/evanw/node-source-map-support usable by typescript node-source-map-support module} |
# Stored here: | |
# https://gist.github.com/erichiller/ee1ad352f8a2dd97a1ed606faa43f87f | |
# Set the cursor to be at the end of the line when searching history. ie. ^ Up arrow | |
Set-PSReadLineOption -HistorySearchCursorMovesToEnd | |
# Change character prefix for multiline commands | |
Set-PSReadLineOption -ContinuationPrompt ' ' | |
# see possible options under "Tab Complete" here: |
# ERIC - EDH - setup bash | |
# If not running interactively, don't do anything | |
# this keeps SCP (file transfer from throwing errors) -- stops here | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac | |
# Prevent Loops |
{ | |
"name": "copy-relative-path", | |
"displayName": "Copy Relative Path", | |
"description": "Copy Relative Path from a File", | |
"version": "0.0.1", | |
"publisher": "alexdima", | |
"engines": { | |
"vscode": "^1.4.0" | |
}, | |
"categories": [ |
from logging import getLogger | |
from typing import List, Any, Dict | |
import random | |
from json import JSONDecoder, JSONEncoder | |
from collections import UserList | |
info = getLogger(__name__).info | |
debug = getLogger(__name__).debug | |
info = getLogger(__name__).info | |
warn = getLogger(__name__).warn |
# .clang-format | |
# Eric D. Hiller | |
# 2018 February 12 | |
# reference: | |
# <http://clang.llvm.org/docs/ClangFormatStyleOptions.html> | |
# To convert to a Value: 'quoted' format | |
# which is required for https://zed0.co.uk/clang-format-configurator/ | |
# use the regex search: \n(?=\n{1,2}[#A-Za-z]) | |
# and replace with '\n |
# dotnet suggest shell start | |
#$env:PATH+=":~/.dotnet/tools"; | |
if (Get-Command "dotnet-suggest" -errorAction SilentlyContinue) | |
{ | |
$availableToComplete = (dotnet-suggest list) | Out-String | |
$availableToCompleteArray = $availableToComplete.Split([Environment]::NewLine, [System.StringSplitOptions]::RemoveEmptyEntries) | Where-Object { $_ -ne "dotnet" } | |
Register-ArgumentCompleter -Native -CommandName $availableToCompleteArray -ScriptBlock { | |
param($wordToComplete, $commandAst, $cursorPosition) | |
$fullpath = (Get-Command $commandAst.CommandElements[0]).Source |