Update: Created as a repo for easy install, see chenasraf/git-open
Creates git aliases to open git URLs for project, new PR, PR list and CI-CD/Actions.
Usage: git open
| // ==UserScript== | |
| // @name Nextcloud App Store — inline screenshot modal | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2026-07-25 | |
| // @description Replace the native fullscreen screenshot preview with an inline modal that covers most of the page and can be dismissed (Esc, backdrop click, or ×). Adds prev/next navigation across the gallery. | |
| // @author You | |
| // @match https://apps.nextcloud.com/apps/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=nextcloud.com | |
| // @downloadURL https://gist.githubusercontent.com/chenasraf/6bfd798958d876b2b123ce395f9298b4/raw/userscript.js | |
| // @updateURL https://gist.githubusercontent.com/chenasraf/6bfd798958d876b2b123ce395f9298b4/raw/userscript.js |
| // ==UserScript== | |
| // @name YouTube Members Only Dimmer | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.3.0 | |
| // @description Make Members Only videos semi-transparent in the feed | |
| // @author Chen Asraf <contact@casraf.dev> | |
| // @match https://www.youtube.com/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com | |
| // @grant none | |
| // @updateURL https://gist.github.com/chenasraf/1a983b99448f3a2c09662d6535bf1fa5/raw/youtube-members-only-dimmer.user.js |
| #!/usr/bin/env bash | |
| ollama_prompt() { | |
| prompt="$@" | |
| endpoint="http://localhost:11434" | |
| curl $endpoint/api/generate -XPOST \ | |
| --no-buffer \ | |
| -s \ | |
| -H 'Content-Type: application/json' \ |
Creates git aliases to open git URLs for project, new PR, PR list and CI-CD/Actions.
Usage: git open
This is a list of aliases/triggers I make for MUSHclient which I think can be useful to others.
truescriptmou becomes mapper cexit open u;;u
mue becomes mapper cexit cast knock e;;open e;;e and also adds sets higher cexit_wait to make sure it succeedsThis format function is great to use on any languages not supported by your current LSP or when you are trying to pass custom arguments.
This example shows how dart format can be used to reformat the current buffer (so
the file save state is irrelevant), replace the buffer with the new contents, and
put the cursor back in position.
We prevent the need to escape any variables or tokens inside by using bash heredoc
| type FirstOf<T extends IOFn[]> = T extends [infer F extends (...args: any) => any, ...IOFn[]] | |
| ? Parameters<F> | |
| : never | |
| type LastOf<T extends IOFn[]> = T extends [...IOFn[], infer L extends (...args: any) => any] | |
| ? ReturnType<L> | |
| : never | |
| type IOFn<I extends any[] = any, O = any> = (...x: I) => O | |
| type Composed<A extends IOFn[]> = (...x: FirstOf<A>) => LastOf<A> | |
| export function compose<A extends IOFn[]>(...fns: A): Composed<A> { |
| type R = Record<string | number, any> | |
| export function parseFieldSafe<T extends Zod.AnyZodObject, K extends keyof Zod.infer<T>>( | |
| obj: T, | |
| key: K, | |
| value: T[K], | |
| ): Zod.SafeParseReturnType<R, R> { | |
| return obj.pick({ [key]: true as const }).safeParse({ [key]: value }) | |
| } |