Skip to content

Instantly share code, notes, and snippets.

View bskim45's full-sized avatar

Bumsoo Kim bskim45

View GitHub Profile
@karpathy
karpathy / add_to_zshrc.sh
Created August 25, 2024 20:43
Git Commit Message AI
# -----------------------------------------------------------------------------
# AI-powered Git Commit Function
# Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It:
# 1) gets the current staged changed diff
# 2) sends them to an LLM to write the git commit message
# 3) allows you to easily accept, edit, regenerate, cancel
# But - just read and edit the code however you like
# the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/
gcm() {
@ansarizafar
ansarizafar / macos-app-icon.md
Created October 16, 2023 04:04 — forked from jamieweavis/macos-app-icon.md
How to create an .icns macOS app icon
@falkheiland
falkheiland / gist:3f822ee3400ea504ddaab46d41bfe8cb
Last active July 28, 2024 20:41
vscode on Synology DSM
@Widdershin
Widdershin / ssr.md
Last active May 1, 2024 17:36
The absurd complexity of server-side rendering

In the olden days, HTML was prepared by the server, and JavaScript was little more than a garnish, considered by some to have a soapy taste.

After a fashion, it was decided that sometimes our HTML is best rendered by JavaScript, running in a user's browser. While some would decry this new-found intimacy, the age of interactivity had begun.

But all was not right in the world. Somewhere along the way, we had slipped. Our pages went uncrawled by Bing, time to first meaningful paint grew faster than npm, and it became clear: something must be done.

And so it was decided that the applications first forged for the browser would also run on the server. We would render our HTML using the same logic on the server and the browser, and reap the advantages of both worlds. In a confusing series of events a name for this approach was agreed upon: Server-side rendering. What could go wrong?

In dark rooms, in hushed tones, we speak of colours.

@ryanmaclean
ryanmaclean / datadog_on_nas.md
Last active May 11, 2023 12:52
Run Datadog As Container to Monitor NAS

Datadog on NASes

Monitoring your Synology or Asus ADM 4 NAS

Summary

Just a walkthrough of the containerized way to get NAS stats to Datadog.

The tl;dr is the container can monitor the host, processes, grab logs and SNMP. If you're using your NAS as a quick dev box you could also monitor other containers.

Synology DSM 6.X

@Grawl
Grawl / nvm-to-asdf-migration.md
Last active August 18, 2024 22:39
migrate from nvm to asdf

TL;DR

With ASDF, you can manage version of Node, Yarn, PNPM, PHP, Python, and more than 400 other tools, languages and binaries.

  1. Uninstall nvm

  2. Install asdf

  3. Install nodejs plugin for asdf

    Add legacy_version_file = yes to ~/.asdfrc file

  4. Install gnupg

@wickedev
wickedev / fzftail.sh
Last active October 24, 2021 15:02
fzf + tail + nl
#!/bin/bash
tail -n +0 $1 \
| nl -ba \
| fzf --multi \
--ansi \
--no-sort \
--reverse \
--tac \
--preview 'sed -n "$(({n}-4)),$(({n}+6))p" '$1' | nl -v $(({n}-4)) -ba' \
@nathanhleung
nathanhleung / FIX-MACOS-HANG.md
Last active September 1, 2024 02:32
Fix macOS Hanging Issue

Fix macOS Hanging Issue

Problem

Hey Apple users:

If you're now experiencing hangs launching apps on the Mac, I figured out the problem using Little Snitch.

It's trustd connecting to http://ocsp.apple.com >

@slash-cyberpunk
slash-cyberpunk / statsd_mapping.conf
Last active July 18, 2022 10:12
Config for stasd_exporter v0.22.7 and airflow 2.3.3
mappings:
- match: "airflow.dag_processing.last_duration.*"
help: "Milliseconds taken to load the given DAG file"
observer_type: summary
name: "airflow_dag_processing_last_duration"
labels:
dag_file: "$1"
- match: "airflow.dagrun.duration.*.*"
help: "Milliseconds taken for a DagRun to reach 'type' state"
observer_type: summary
@marccarre
marccarre / list_kindle_releases.py
Created October 24, 2020 08:46
List all available versions of Kindle for Mac and Kindle for PC.
#!/usr/bin/env python
'''
List all available versions of Kindle for Mac and Kindle for PC.
Dependencies:
- asyncio==3.4.3
- aiohttp==3.6.3
'''
import os
import sys