Skip to content

Instantly share code, notes, and snippets.

View eberkund's full-sized avatar

Erik Berkun-Drevnig eberkund

View GitHub Profile

I had some head-scratching moments setting up Claude to work with the GitHub CLI and 1Password on my MacBook. I had the gh wrapped in a 1Password plugin in /Users/bep/.config/op/plugins.sh:

 alias gh="op plugin run -- gh"

This made gh work great when doing manual terminal work with fingerprint authentication and all. But UI popups doesn't work in Claude, Claude needs a GH_TOKEN.

So, following some sketchy guides online, I created a new vault in 1Password named Claude, and added my GitHub token to that vault:

@t3dotgg
t3dotgg / try-catch.ts
Last active September 11, 2026 06:13
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
@scottgigante-immunai
scottgigante-immunai / action_in_ecr_container.yaml
Last active December 7, 2023 21:07
Running GitHub Actions on an AWS ECR image
name: Run tests
on:
push:
branches:
- 'main'
jobs:
ecr_login:
runs-on: ubuntu-latest
@niclaslindstedt
niclaslindstedt / .gitattributes
Created January 28, 2021 09:02
.gitattributes for JavaScript projects
# Auto-detect text files
* text=auto eol=lf
# Whitespace exclusions
*.txt whitespace=-blank-at-eof,-space-before-tab,-tab-in-indent,trailing-space,tabwidth=2
*.md whitespace=-blank-at-eof,-space-before-tab,-tab-in-indent,trailing-space,tabwidth=2
*.js whitespace=-blank-at-eof,-space-before-tab,-tab-in-indent,trailing-space,tabwidth=2
*.ts whitespace=-blank-at-eof,-space-before-tab,-tab-in-indent,trailing-space,tabwidth=2
*.json whitespace=-blank-at-eof,-space-before-tab,-tab-in-indent,trailing-space,tabwidth=2
@senderle
senderle / hand-modify-pdf.md
Created September 23, 2020 15:03
So you want to modify the text of a PDF by hand

So you want to modify the text of a PDF by hand...

If you, like me, resent every dollar spent on commercial PDF tools, you might want to know how to change the text content of a PDF without having to pay for Adobe Acrobat or another PDF tool. I didn't see an obvious open-source tool that lets you dig into PDF internals, but I did discover a few useful facts about how PDFs are structured that I think may prove useful to others (or myself) in the future. They are recorded here. They are surely not universally applicable --
the PDF standard is truly Byzantine -- but they worked for my case.

@seyedi
seyedi / darkmode.svg
Last active September 10, 2026 04:52
SVG favicon for modern browsers
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@roberto-butti
roberto-butti / main.yml
Last active December 16, 2023 23:43
GitHub Actions workflow for Laravel (automated test)
name: Laravel
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
laravel-tests:
@javivelasco
javivelasco / 00-intro.md
Created December 20, 2016 08:40 — forked from mdo/00-intro.md
Instructions for how to affix an Ikea Gerton table top to the Ikea Bekant sit-stand desk frame.

Ikea Bekant standing desk with Gerton table top

@karlhorky
karlhorky / migrate-repo-to-lfs.sh
Last active February 28, 2019 07:42
Migrate existing design git repo to large file storage with history
git filter-branch --prune-empty --tree-filter '
git lfs track "*.ai"
git lfs track "*.psd"
git lfs track "*.eps"
git lfs track "*.jpg"
git lfs track "*.png"
git lfs track "*.svg"
git add .gitattributes
git ls-files -z | xargs -0 git check-attr filter | grep "filter: lfs" | sed -E "s/(.*): filter: lfs/\1/" | tr "\n" "\0" | while read -r -d $'"'\0'"' file; do
@glen-cheney
glen-cheney / encoding-video.md
Last active August 19, 2026 07:56
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus