Skip to content

Instantly share code, notes, and snippets.

export FZF_DEFAULT_COMMAND='find -L * -type f -and -not -name \*.lst'
# bind ctrl-E to "edit fuzzy"
function edit_fuzzy() {
TARGET=$(fzf)
if [ $? -eq 0 ]
then
echo -e "${PS1@P}edit $TARGET"
history -s "edit $TARGET"
edit "$TARGET"
From 4f2c0ddcb3f402a4ec7dcb57dfec78c2719e4004 Mon Sep 17 00:00:00 2001
From: FeepingCreature <feepingcreature@gmail.com>
Date: Fri, 4 Sep 2020 14:33:17 +0000
Subject: [PATCH] Mines: add mass-flag shortcut.
Right-click on a tiles where the count of covered adjacent tiles
matches the number of the tile - so that they are obviously all
bombs - and all covered adjacent tiles are flagged.
This provides symmetry with the left-click mass-reveal option.
@FeepingCreature
FeepingCreature / youre_doing_json_apis_wrong.md
Last active January 7, 2024 19:33
You Are Doing JSON APIs Wrong

You are doing JSON APIs wrong.

When you use JSON to call an API - not a REST API, but something like JSON-RPC - you will usually want to encode one of several possible messages.

Your request body looks like this:

{
 "type": "MessageWithA",
module day2;
macro import neat.macros.listcomprehension;
macro import neat.macros.assert;
import std.stdio;
import std.file;
import std.string;
alias command = (
module day1_2;
macro import neat.macros.listcomprehension;
import std.stdio;
import std.file;
import std.string;
void main() {
[depth.atoi for depth in "day1.txt".readText.split("\n")]
module day1;
macro import neat.macros.listcomprehension;
import std.stdio;
import std.file;
import std.string;
void main() {
[depth.atoi for depth in "day1.txt".readText.split("\n")]
module day1;
macro import neat.macros.listcomprehension;
import std.stdio;
import std.file;
import std.string;
void main() {
auto depths = [depth.atoi for depth in "day1.txt".readText.split("\n")];
module day1;
macro import neat.macros.listcomprehension;
import std.stdio;
import std.file;
import std.string;
void main() {
auto depths = [depth.atoi for depth in "day1.txt".readText.split("\n")];
module alsatest;
macro import neat.macros.cimport;
import c_header("alsa/asoundlib.h");
import std.stdio;
import std.string;
pragma(lib, "asound");
module nntest;
macro import neat.macros.cimport;
import neat.runtime : print;
import c_header("stdlib.h") : expf, rand, RAND_MAX;
import std.math : abs, exp, pow;