Skip to content

Instantly share code, notes, and snippets.

View channprj's full-sized avatar

Park Hee Chan channprj

View GitHub Profile
@haje01
haje01 / add_to_zshrc.sh
Last active November 13, 2024 09:59 — forked from karpathy/add_to_zshrc.sh
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() {
@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() {
@thesamesam
thesamesam / xz-backdoor.md
Last active November 4, 2024 18:32
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@levelsio
levelsio / gist:5bc87fd1b1ffbf4a705047bebd9b4790
Last active November 5, 2024 18:04
Secret of Monkey Island: Amsterdam (by @levelsio) or how to create your own ChatGPT image+text-based adventure game
# 2023-11-27 MIT LICENSE
Here's the open source version of my ChatGPT game MonkeyIslandAmsterdam.com.
It's an unofficial image+text-based adventure game edition of Monkey Island in Amsterdam, my home town.
Please use it however you want. It'd be nice to see more ChatGPT-based games appear from this. If you get inspired by it, please link back to my X https://x.com/levelsio or this Gist so more people can do the same!
Send me your ChatGPT text adventure game on X, I'd love to try it!
@amw
amw / pillow-vs-vips.py
Last active September 19, 2023 10:48
Performance comparison of image resizing methods in Pillow and PyVIPS
#!/usr/bin/env python
# Script for comparing Pillow vs PyVIPS used for this issue:
# https://github.com/libvips/pyvips/issues/148
import sys
import timeit
import pyvips
@EdgarOrtegaRamirez
EdgarOrtegaRamirez / payload.json
Created May 10, 2022 18:52
Github Actions Context Payload for Push Event
{
"payload":{
"after":"65aeff1fc085e1e369533de9f59b2754c5bb20b1",
"base_ref":null,
"before":"77a9bae00f0d6996e0883ce6d23f2778c6a2ee25",
"commits":[
{
"author":{
"email":"[email protected]",
"name":"First Last",
@tatsuyasusukida
tatsuyasusukida / !README-javascript-media-audio.md
Last active September 5, 2023 12:22
🎤 How to record audio using the MediaStream Recording API in JavaScript

🎤 How to record audio using the MediaStream Recording API in JavaScript

@tatsuyasusukida
tatsuyasusukida / !README-javascript-audio.md
Last active October 24, 2024 21:35
🎵 How to record audio using the Web Audio API in JavaScript

🎵 How to record audio using the Web Audio API in JavaScript

Demo video: How to record audio using the Web Audio API in JavaScript

About this article

This article describes how to record audio using the Web Audio API in JavaScript. The related resources are shown below.

@jvacek
jvacek / Remove unused python imports on save in VSCode.md
Last active June 18, 2023 10:20
Remove unused python imports on save in VSCode

Auto-remove unused python imports in VSCode on save

I could not find a proper full configuration for this online, and I know I'll need this again in the future.

There are two ways to achieve this with some plugins; one via hitting the shell and doing an in-place replace, the other is by doing it with extensions configurable in vscode. Both should give you the same results.

Install VSCode extensions needed:

If running via bash: