Skip to content

Instantly share code, notes, and snippets.

View ravicious's full-sized avatar

Maja ravicious

View GitHub Profile
@ravicious
ravicious / README.md
Last active May 11, 2026 12:36
jj prompt for oh-my-zsh

jj-aware oh-my-zsh prompt

oh-my-zsh snippet that shows the closest Jujutsu bookmark when you're inside a jj repo, falling back to the git branch otherwise. Prefers mutable bookmarks (your working branches) over immutable ones (main, tags). Runs in oh-my-zsh's async-prompt background process so it doesn't block prompt redraw.

It uses git's dirty marker because jj doesn't understand submodules yet. Because of how jj log works, bookmarks that are out of sync with origin will have * appended to their names, which I think is a nice bonus.

Themes

Works with any oh-my-zsh theme that uses the standard git_prompt_info function and ZSH_THEME_GIT_PROMPT_* variables — robbyrussell, garyblessington, fwalch, and most simpler themes.

@ravicious
ravicious / index.html
Created March 13, 2026 09:29
cross-origin isolation Chromium repo
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Cross-Origin Isolation Repro</title>
<style>
body { font-family: monospace; padding: 2em; }
.pass { color: green; }
.fail { color: red; }
</style>
@ravicious
ravicious / useAsync.test.ts
Created January 3, 2025 14:38
useAsync: andMap, map2, map3
describe('andMap', () => {
const tests: Array<{
statusA: AttemptStatus;
statusB: AttemptStatus;
expectedStatus: AttemptStatus;
}> = [
{
statusA: 'success',
statusB: 'success',
expectedStatus: 'success',
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
@ravicious
ravicious / index.html
Created January 12, 2024 15:10
Electron #40798 repro
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'">
<link href="./styles.css" rel="stylesheet">
<title>Hello World!</title>
</head>
<body>
@ravicious
ravicious / child.js
Created January 12, 2024 11:10
Electron #40798 repro attempt
const {setTimeout} = require('node:timers/promises')
process.on('SIGTERM', () => {
console.log('got SIGTERM')
setTimeout(100).then(() => {
console.log('Exiting')
process.exit(0)
})
})
@ravicious
ravicious / ubezpieczenie.md
Last active March 2, 2022 18:18
Ubezpieczenie dobrowolne po zawieszeniu działalności gospodarczej krok po kroku

Kilka podstawowych kwestii:

  • Cały proces zajmuje 2-3 tygodnie i prawie nic nie da się zrobić przez internet. Najlepiej zabrać się za to przynajmniej na dwa tygodnie przed terminem, od którego chcecie być ubezpieczeni. A można i nawet wcześniej, bo we wniosku składanym do NFZ wpisuje się, od kiedy chce się podlegać ubezpieczeniu.

  • Składka za ubezpieczenie dobrowolne jest niepodzielna. Czy zaczniecie być ubezpieczeni z pierwszym dniem miesiąca, czy z ostatnim, to i tak płacicie składkę za cały miesiąc.

  • Przez miesiąc czy tam 30 dni po zawieszeniu działalności wciąż jesteście ubezpieczeni z tytułu prowadzenia działalności.

  • Z tych właśnie powodów najlepiej zawiesić działalność z końcem miesiąca i podpisać umowę o ubezpieczenie z początkiem tego, od którego wygasa ubezpieczenie z tytułu prowadzenia działalności. Czyli np. zawieszam z końcem maja i od lipca ubezpieczam się dobrowolnie.

@ravicious
ravicious / index.html
Created May 20, 2021 16:47
Basic HTML template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Hello, World!</title>
<meta name="description" content="Basic HTML template">
</head>
<body>
</body>
@ravicious
ravicious / postgres-app-cli
Created August 1, 2020 12:05
Postgres.app: Change path to command line utilities based on the currently running version of the Postgres server
# Change path to Postgres.app command line utilities based on the version of Postgres that's currently running.
export PATH="/Applications/Postgres.app/Contents/Versions/$(psql -c 'show data_directory;' | perl -n -e '/Postgres\/var-(.+)$/ && print $1')/bin:$PATH"
@ravicious
ravicious / post.md
Created March 30, 2020 11:37
Fixing problem with libruby-static.a when installing older Ruby versions on macOS

For a long time I had this problem where installing a Ruby through ruby-build or ruby-install would fail with an error saying "Undefined symbols for architecture x86_64".

linking static-library libruby-static.a
ar: `u' modifier ignored since `D' is the default (see `U')
verifying static-library libruby-static.a
ld: warning: ignoring file libruby-static.a, building for macOS-x86_64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture x86_64:
  "_ruby_init", referenced from:
      _main in main.o