Skip to content

Instantly share code, notes, and snippets.

View drichardson's full-sized avatar

Doug Richardson drichardson

View GitHub Profile
drichardson / obsidian-web-clipper.js
Last active May 28, 2024 17:40 — forked from kepano/obsidian-web-clipper.js
Using my properties
javascript: Promise.all([import(''), import(''), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
drichardson / github-org-up
Last active September 11, 2022 15:27
Clone/update all repositories in an organization you have access to.
# Clone/pull every repo you have access to in a github org into a directory.
# Source:
set -euo pipefail
# Max repos to checkout.
usage() {
drichardson / reset.ps1
Last active November 18, 2021 23:03
Powershell Reset - Remove horizontal scrollbar and clear
function reset {
function Set-Buffer-Width-To-Screen-Width {
$h = Get-Host
$ui = $h.UI.RawUI
$bufferSize = $ui.BufferSize
$windowSize = $ui.WindowSize
#pragma once
#include "CoreMinimal.h"
#include "Engine/World.h"
#include "EngineUtils.h"
drichardson / WorldSingleton.h
Created December 31, 2020 22:37
UE4 World Singleton
#pragma once
#include "CoreMinimal.h"
#include "Engine/World.h"
#include "EngineUtils.h"
* TWorldSingleton is a weak pointer to a actor in a level, which is only a
* singleton by convention of only one actor of that type being in a UWorld.
drichardson / pre-commit
Created December 16, 2020 21:20
git pre-commit hook script to run pycodestyle to check for PEP-8 conformance
# Is pycodestyle is installed?
which pycodestyle &> /dev/null
if [[ $? -ne 0 ]]; then
cat <<-EOF
pre-commit hook failed. pycodestyle is not installed.
Run the following and try your commit again:
pip install pycodestyle
drichardson /
Created December 7, 2020 21:20
List github gpg public keys for a user
import json
import sys
import urllib.request
import os
usage=f'''Missing username.
drichardson / Out-FileUtf8NoBom.psm1
Created October 24, 2017 20:15 — forked from mklement0/Out-FileUtf8NoBom.ps1
PowerShell function that emulates Out-File for creating UTF-8-encoded files *without a BOM* (byte-order mark).
Outputs to a UTF-8-encoded file *without a BOM* (byte-order mark).
Mimics the most important aspects of Out-File:
* Input objects are sent to Out-String first.
* -Append allows you to append to an existing file, -NoClobber prevents
overwriting of an existing file.
* -Width allows you to specify the line width for the text representations