Skip to content

Instantly share code, notes, and snippets.

View neurosnap's full-sized avatar

Eric Bower neurosnap

View GitHub Profile
@mterwill
mterwill / USAGE.md
Last active April 27, 2025 15:04
Beancount importers, scripts, etc.

Note: everything here is pretty specific to my usage/accounts and not written for public use... You'll probably have to tweak a bunch of stuff.

$ bean-extract config.py ~/Downloads # the csvs should be in here
@yudai
yudai / README.md
Created November 29, 2017 01:04
tmux + mosh OSC 52 clipboard paste hack

Problem

Now tmux, mosh and iTerm2 support the OSC 52 sequence that enables clipboard sharing. However, there is a trap that prevents them from working together.

Mosh accepts OSC 52 sequences with the c; option. However, tmux doesn't send that option when it emits OSC 52 sequences, which means you cannot use tmux and mosh together with the default configuration.

Workaround

You can override the OSC 52 sequence generated by tmux by adding the following line to your tmux.conf.

@kahole
kahole / index.html
Last active October 10, 2024 20:28
*scratch*.js
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>*scratch*</title>
<style>
body {
font-family: Hack, Menlo, Monaco, 'Droid Sans Mono', 'Courier New', monospace;
white-space: pre;
@geelen
geelen / maybe-error.md
Last active January 4, 2024 22:51
"Maybe Error" pattern in Typescript

"Maybe Error" pattern in Typescript

TL;DR? 👉 Implementation.

Inspiration

So one of the things I've liked about working with Go is that you use multiple return values a lot, with early exits that work as a kind of guard:

func GetUserFromAuth(name string, auth Auth) (error, User) {
@cowboyd
cowboyd / 01-scope.ts
Last active March 29, 2023 16:22
Beefed up `Scope`
import type { Stream, Task, Operation, Result } from "./types.ts";
export interface Scope extends Operation<void> {
run<T>(operation: () => Operation<T>): Task<T>;
close(): Operation<void>;
created: Stream<Task<unknown>, void>;
enqueued: Stream<Operation<unknown>, void>;
dropped: Stream<Operation<unknown>, void>;
results: Stream<{task: Task<unknown>, result: Result<unknown>}, void>;
}
@GllmR
GllmR / init.lua
Last active October 11, 2024 16:38
One file Neovim configuration
---@diagnostic disable: undefined-global
-------------------
-- EDITOR CONFIG --
-------------------
vim.opt.compatible = false
vim.opt.tabstop = 2 -- Two spaces for tab
vim.opt.softtabstop = 2
vim.opt.shiftwidth = 2 -- Two spaces for indentation