Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# - Take a screenshot of the active monitor
# - View said screenshot in fullscreen
# - Ask the user for the region to crop
# - Pass the crop geometry for ImageMagick to crop and copy it
# + Grab the active workspace's window geometries for suggested crops
CURRENT_OUTPUT=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | .name')
@mary-ext
mary-ext / bluesky-search-convert-local-time.ts
Last active April 13, 2024 17:51
Convert Bluesky's datetime search to local time
// https://github.com/golang/go/blob/519f6a00e4dabb871eadaefc8ac295c09fd9b56f/src/strings/strings.go#L377-L425
const fieldsfunc = (str: string, fn: (rune: number) => boolean): string[] => {
const slices: string[] = [];
let start = -1;
for (let pos = 0, len = str.length; pos < len; pos++) {
if (fn(str.charCodeAt(pos))) {
if (start !== -1) {
slices.push(str.slice(start, pos));
start = -1;
  • from (from:me or from:bsky.app or from:@bsky.app)
    posts created by specified user

  • mentions (mentions:me or mentions:bsky.app or mentions:@bsky.app)
    posts mentioning specified user

  • to (to:me or to:bsky.app or to:@bsky.app)
    currently an alias for mentions

  • since (since:2024-04-13 or since:2024-04-13T17:00:00.000Z)

@mary-ext
mary-ext / typescript-deno.sh
Created March 12, 2024 08:02
TypeScript LSP server launcher, launches Deno's LSP server if deno.json is detected on project folder
#!/bin/bash
if [ -f deno.json ] || [ -f deno.jsonc ]; then
~/.deno/bin/deno lsp
else
typescript-language-server --stdio
fi
// Don't check for browser defaults
user_pref("browser.shell.checkDefaultBrowser", false);
// Show compact mode UI option, and enable it.
user_pref("browser.compactmode.show", true);
user_pref("browser.uidensity", 1);
// Enable auto-scrolling
user_pref("general.autoScroll", true);
@mary-ext
mary-ext / delete-follow-orphans.ts
Last active January 25, 2024 05:16
bluesky delete orphaned follows
import { Agent } from '@externdefs/bluesky-client/agent';
import type { Records, RefOf } from '@externdefs/bluesky-client/atp-schema';
const BSKY_USERNAME = '';
const BSKY_PASSWORD = '';
const agent = new Agent({ serviceUri: 'https://bsky.social' });
await agent.login({ identifier: BSKY_USERNAME, password: BSKY_PASSWORD });
const did = agent.session!.did;
diff --git a/dist/esm/index.js b/dist/esm/index.js
index 2fe5ec67e1bd5f86653cfa49a9ab40c2e75afda3..9521be9e7b4368dad9f3d73238b611f8f10a3067 100644
--- a/dist/esm/index.js
+++ b/dist/esm/index.js
@@ -2122,18 +2122,13 @@ function swap(form, name, {
/**
* Handles the lifecycle dependent state of a field or field array.
*
+ * @param getStore The field store.
* @param props The lifecycle properties.