Skip to content

Instantly share code, notes, and snippets.

@caraboides
caraboides / quake_toggle.ts
Last active March 4, 2026 01:17
Quake-style Toggle for wezterm-gui on Hyprland
#!/usr/bin/env bun
// Quake-style Toggle for wezterm-gui on Hyprland
// Add to your hyprland config:
// bind = $mainMod, Space, exec, ~/.config/hypr/quake_toggle.ts quake
// windowrule = float on, match:class quake
// windowrule = move (cursor_x-(window_w*0.5)) (cursor_y-(window_h*0.5)), match:class quake
//
// or run ./quake_toggle.ts <class>
import { $, spawn } from "bun";
@caraboides
caraboides / backup-mongodb-to-s3.sh
Last active August 2, 2023 06:11
Simple script to backup MongoDB to S3, without waste diskspace for temp files. And a way to restore from the latest snapshot.
#!/bin/sh
set -e
HOST=localhost
DB=test-entd-products
COL=asimproducts
S3PATH="s3://mongodb-backups-test1-entd/$DB/$COL/"
S3BACKUP=$S3PATH`date +"%Y%m%d_%H%M%S"`.dump.gz
S3LATEST=$S3PATH"latest".dump.gz
/usr/bin/aws s3 mb $S3PATH