Skip to content

Instantly share code, notes, and snippets.

View Ovyerus's full-sized avatar
🎉
brain is a lot better

Michael Mitchell Ovyerus

🎉
brain is a lot better
View GitHub Profile
@Ovyerus
Ovyerus / skhdrc
Created January 23, 2023 03:59
macOS wm dots
# Move/swap windows
meh - w : yabai -m window --swap north
meh - a : yabai -m window --swap west
meh - r : yabai -m window --swap south
meh - s : yabai -m window --swap east
hyper - w : yabai -m window --warp north
hyper - a : yabai -m window --warp west
hyper - r : yabai -m window --warp south
hyper - s : yabai -m window --warp east
@Ovyerus
Ovyerus / The Ultimate Naming Script.ptsp
Created August 23, 2022 12:25
The best Picard naming format
title: The Ultimate Naming Script
description: ""
author: ''
license: ''
version: ''
last_updated: 2022-03-03 13:29:23 UTC
script_language_version: '1.1'
script: |
$if($gt(%totaltracks%,1),%albumartist% - %album%/,)
$if($gt(%totaltracks%,1),$if($gt(%totaldiscs%,1),%discnumber%-,)$num(%tracknumber%, 2),) %artist% - %title%
@Ovyerus
Ovyerus / profile.ps1
Created April 1, 2022 05:47
epic powershell prompt
set-psreadlineoption -predictionsource history
$asciiSymbols = $false # If your terminal doesn't display unicode properly
$esc = [char]27
$r = "$esc[0m"
$symbols = @{
pathOpen = if (!$asciiSymbols) { "⌈" } else { "[" };
pathClose = if (!$asciiSymbols) { "⌋" } else { "]" };
timeOpen = if (!$asciiSymbols) { "⌊" } else { "[" };
@Ovyerus
Ovyerus / config.fish
Last active February 28, 2020 23:25
Helpful fish aliases and stuff
# Store normal bins
alias _cat (which cat)
alias _find (which find)
alias _grep (which grep)
alias _ls (which ls)
alias _nano (which nano)
# Alias cool and swag bins
alias cat 'bat'
alias find 'fd'
@Ovyerus
Ovyerus / yes.js
Created February 22, 2020 13:14
Serially execute a chunk of parallel tasks one after another (without caring about return value)
const chunk = (arr, n) =>
Array.from({ length: Math.ceil(arr.length / n) }, (v, i) =>
// eslint-disable-next-line no-mixed-operators
arr.slice(i * n, i * n + n)
);
const data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
chunk(data, 2)
// Turn each chunk into a function that will await all of its parts to resolve before finishing
@Ovyerus
Ovyerus / config.fish
Last active August 7, 2020 04:11
Sexy fish prompt
set -g symb '▲'
set -g leading_brace 0
set -g has_launched 0
function git_info
set -l branch (git rev-parse --abbrev-ref HEAD 2> /dev/null)
printf "%s(%s%s%s)" $c0 $c1 $branch $c0
set -l changes (git status --porcelain --ignore-submodules 2> /dev/null)
@Ovyerus
Ovyerus / index.js
Created January 31, 2020 02:09
cool async generator helper for nodejs stdin
/** Helper for working with `process.stdin` as a char-by-char iterator */
async function* stdin() {
process.stdin.setEncoding('utf-8');
process.stdin.resume();
if (process.stdin.isTTY) process.stdin.setRawMode(true);
for await (const char of process.stdin) {
// raw mode doesn't get set when piping text into stdin, so often text is
// given altogether
if (char.length > 1) {
@Ovyerus
Ovyerus / cameraplus.cfg
Created January 10, 2020 03:22
My CameraPlus config
fov=110
antiAliasing=2
renderScale=1
positionSmooth=5
rotationSmooth=5
cam360Smoothness=2
thirdPerson=False
showThirdPersonCamera=True
use360Camera=False
posx=1.155572
@Ovyerus
Ovyerus / prompt-preview.png
Last active August 7, 2020 04:13
Hot powershell prompt
prompt-preview.png

Keybase proof

I hereby claim:

  • I am ovyerus on github.
  • I am ovyerus (https://keybase.io/ovyerus) on keybase.
  • I have a public key ASBQtl_G8qlPAfiXLFkr95Ydxe61RFiCQn2tkbj2QjgCjQo

To claim this, I am signing this object: