Skip to content

Instantly share code, notes, and snippets.

View 0-sv's full-sized avatar
🏠
Working from home

0-sv 0-sv

🏠
Working from home
View GitHub Profile
@0-sv
0-sv / read-all-gh-notifications.sh
Created October 6, 2025 12:40
GitHub ghost notifications
echo 'edit last_read_at to current date pls!'
curl -X PUT \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token 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" \
https://api.github.com/notifications \
-d '{"last_read_at":"2025-10-06T00:00:00Z"}'
@0-sv
0-sv / evaluate-variables-vscode.md
Created February 11, 2025 08:41
VSCode evaluate variables
  1. Put tasks.json in .vscode/tasks.json
  2. (osx) cmd+shift+p -> run "Tasks: Run Task"
@0-sv
0-sv / run.sh
Created January 23, 2025 13:37
What's my network info
curl ifconfig.me/all
@0-sv
0-sv / kill_on_port.sh
Created November 12, 2024 09:23
Kill on port:$port
sudo lsof -i :3000 | awk 'NR!=1 {print $2}' | xargs sudo kill
@0-sv
0-sv / caffeinate.sh
Created November 6, 2024 20:29
Keep macos awake
caffeinate
@0-sv
0-sv / bundlers.md
Created October 29, 2024 12:36
Bundler options

Here's a comprehensive comparison table of the build tools:

Feature Webpack Rollup Vite ESbuild
Release Year 2012 2015 2020 2020
Written In JavaScript JavaScript JavaScript Go
Primary Use Case Large applications Libraries & frameworks Modern web apps Performance-critical builds
Build Speed Slower Moderate Fast (Dev), Moderate (Prod) Extremely fast
Key Features - Hot Module Replacement
- Rich plugin ecosystem
- Code splitting
- Dynamic imports
- Asset bundling
- Complex configurations
- Efficient tree shaking
- ES Module bundling
- Simple configuration
- Small bundle sizes
- Plugin system
- No bundling in dev
- Lightning fast HMR
- Built-in TypeScript support
- Uses ESbuild (dev)
- Uses Rollup (prod)
- Ultra-fast builds
- Built-in minification
- TypeScript/JSX support
- Low-level API
Configuration Complex Moderate
@0-sv
0-sv / put-screenshot-folder.sh
Created October 28, 2024 11:04
Put MacOS screenshots in dedicated folder
defaults write com.apple.screencapture location ~/Pictures/Screenshots
mkdir -p ~/Pictures/Screenshots
killall SystemUIServer
@0-sv
0-sv / screenshot.sh
Created October 25, 2024 08:51
Screenshot exactly 1280x800
#!/bin/bash
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
# Check if required tools are available
check_requirements() {
if ! command -v screencapture >/dev/null 2>&1; then
@0-sv
0-sv / backup.sh
Created October 22, 2024 11:01
Sync google takeout to s3 deep glacier for cheap backup
aws s3 sync . s3://google-drive-backup-$accountId-eu-north-1 --profile $profile --region eu-north-1 --storage-class DEEP_ARCHIVE
@0-sv
0-sv / export.sh
Created October 10, 2024 10:46
export all .env vars
export $(grep -v '^#' .env | xargs)