Skip to content

Instantly share code, notes, and snippets.

View Strajk's full-sized avatar
🐣
knock knock…

Pavel 'Strajk' Dolecek Strajk

🐣
knock knock…
View GitHub Profile
// Name: Finicky Switch Default Browser
// Description: Switches the default browser in Finicky config
// Author: Strajk
import '@johnlindquist/kit'
import fs from 'fs'
let finickyPath = home('.finicky.js')
// Check if Finicky config exists
// Name: Flashcards
// Description: Space-repeat images, managed just by filesystem
// Shortcut: shift+ctrl+option+cmd+o
import '@johnlindquist/kit'
const flashcardsDir = kenvPath('db', 'flashcards')
await ensureDir(flashcardsDir)
const today = new Date()
// Name: Speed Up Video
// Description: Speed up a video, optionally keeping the first and last X seconds at original speed
// Author: Strajk
import '@johnlindquist/kit';
// Get the video file path, either from selection or prompt
import { Choice } from '@johnlindquist/kit';
const videoPath = await getSelectedFile() || await path({ placeholder: 'Select a video file' });
# Day 1 - Monday
* Spent first hour debugging a prod issue - turned out to be an env var mismatch
* Stand-up meeting ran long due to heated discussion about switching from REST to GraphQL
* Found three security vulnerabilities in deps audit - spent 2 hours updating pkgs
* Wrote docs for the new auth middleware - nobody will read them anyway
* Battled with TypeScript types for a recursive data structure
* Merged 5 PRs that were collecting dust in review
* Coffee machine broke - considered declaring technical bankruptcy
* Actually got into flow state for 2 hours - wrote elegant solution for data sync
* Discovered a memory leak in prod - left it for tomorrow

BananaCrypt Documentation


Overview

BananaCrypt is a revolutionary encryption library inspired by the peeling complexity of bananas. It uses the potassium levels of bananas as the base for its cryptographic algorithms. Perfect for developers who want to keep their secrets safe and fruity.


@Strajk
Strajk / gist:2e7d57e65e69365e02567d103f812496
Created January 5, 2025 16:30
BananaCrypt Documentation
### **BananaCrypt Documentation**
* * *
## **Overview**
BananaCrypt is a revolutionary encryption library inspired by the peeling complexity of bananas. It uses the potassium levels of bananas as the base for its cryptographic algorithms. Perfect for developers who want to keep their secrets safe and fruity.
* * *
// Name: Chrome Profiles
// Description: List Chrome profiles and copy their path to clipboard/open in Finder
// Author: Strajk
import '@johnlindquist/kit'
import { Choice } from '@johnlindquist/kit/types';
const chromeAppSupportPaths = [
home('Library/Application Support/Google/Chrome/'),
home('Library/Application Support/Google/Chrome Canary/'),
// Name: Night Shift
// Description: Control Night Shift on macOS
// Author: Pavel 'Strajk' Dolecek
// Acknowledgements:
// - https://github.com/smudge/nightlight
// - https://github.com/shmulvad/alfred-nightshift/
// Notes:
// nightlight CLI usage:
// on/off: `nightlight on|off|toggle`, status will show current state
// temp: `nightlight temp [0-100]`, no argument will show current temperature
// Name: Faker
// Description: Generate fake data with faker.js
// Author: Pavel 'Strajk' Dolecek
// Twitter: @straaajk
import "@johnlindquist/kit"
import { faker } from '@faker-js/faker';
import { Choice } from "@johnlindquist/kit";
// Name: Karabiner Elements Profile Switcher
// Acknowledgements:
// - https://www.alfredforum.com/topic/9927-karabiner-elements-profile-switcher/
// Notes:
// - Probably could also work with cli https://github.com/raycast/extensions/blob/be03024b4c4f4f1ad0af7f4d20ea4630d7f0ee20/extensions/karabiner-profile-switcher/src/model/KarabinerManager.ts
import "@johnlindquist/kit"
import fs from 'fs'
const CONFIG_PATH = home('.config/karabiner/karabiner.json')