Skip to content

Instantly share code, notes, and snippets.

View kkpan11's full-sized avatar

Gianni Hong kkpan11

View GitHub Profile
@EliFuzz
EliFuzz / RAML vs OAS.md
Last active December 4, 2023 20:54
Comparison table between RAML and OAS
Features RAML OAS
popularity less popular more popular and widely used
backed by Mulesoft OpenAPI Initiative, which is a consortium of industry leaders and experts
expressiveness more expressive and flexible less due to lack of annotations, overlays, extensions, libraries
interoperability less compatable more interoperable and compatible
maintenance relatively less updates more actively maintained and updated with a clear roadmap and vision for its future
focused on modeling APIs
@veekaybee
veekaybee / chatgpt.md
Last active October 16, 2025 08:47
Everything I understand about chatgpt

ChatGPT Resources

Context

ChatGPT appeared like an explosion on all my social media timelines in early December 2022. While I keep up with machine learning as an industry, I wasn't focused so much on this particular corner, and all the screenshots seemed like they came out of nowhere. What was this model? How did the chat prompting work? What was the context of OpenAI doing this work and collecting my prompts for training data?

I decided to do a quick investigation. Here's all the information I've found so far. I'm aggregating and synthesizing it as I go, so it's currently changing pretty frequently.

Model Architecture

@mnpenner
mnpenner / color.ts
Last active April 22, 2024 02:41
RGB color hex to lightness
// based on https://stackoverflow.com/a/56678483/65387
type RGB = [r: number, g: number, b: number]
const UNK = 255 / 2
/**
* @param hex RGB hex string like "#CCCFDB"
* @returns RGB tuple in [0-255]
*/
@Mearman
Mearman / Obsidian Snippets
Last active October 17, 2025 02:48
Obsidian Snippets
A collection of snippets
@lindseywild
lindseywild / accessibility-checklist
Created May 31, 2022 15:58
Accessibility Checklist
# Accessibility Checklist
## Overview
This checklist can be referenced when building or updating a feature. Not every item will apply to every situation.
- [ ] Feature is usable with a keyboard only (using Tab to move forward, Shift + Tab to move backwards)
- [ ] You can interact with all controls, links, and menus
- [ ] You can see what item has focus at all times
- [ ] The visual focus order matches the intended interaction order
- [ ] You are not “trapped” within one element
@ngrislain
ngrislain / py38-success.ipynb
Last active September 10, 2025 03:46
py38 success.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@4e4c52
4e4c52 / fish_install.md
Last active August 26, 2025 05:59 — forked from gagarine/fish_install.md
Install fish shell on macOS with Apple Silicon and brew

Installing Fish shell on MacOS

Fish is a smart and user-friendly command line (like bash or zsh). This is how you can nstall it on MacOS and make your defaul shell.

Note that you need the https://brew.sh/ package manager.

You can also download the fish app from their website. I do recomand using brew because update are easier.

Install Fish

@plivox
plivox / auto_switch_theme.py
Last active April 24, 2025 15:45
Automatic iTerm2 preset switching on MacOS
#!/usr/bin/env python3
import asyncio
import iterm2
THEME_LIGHT = "Tango Light"
THEME_DARK = "Tango Dark"
class AutoSwitchTheme:
@Te-k
Te-k / pdf_metadata.md
Created November 26, 2020 10:31
How to remove metadata from PDFs

Many tools do not fully remove metadata, but just remove the link with in the metadata table. The data are thus still available in the PDF file itself.

While a lot of people rely on Exiftool to remove metadata, it actually does the same in PDFs. If you remove metadata with exiftool -all= some.pdf, you can always restore the data with exiftool -pdf-update:all= some.pdf.

There are several options to remove PDF metadata safely:

Option 1 : Exiftool with qpdf

  • Remove metadata with exiftool : exiftool -all= some.pdf
  • Then remove ununsed objects with qpdf : qpdf --linearize some.pdf - > some.cleaned.pdf
@dnanto
dnanto / geomid.R
Created June 25, 2020 18:14
Calculate the geographic midpoint given a list of geographic coordinates in R.
library(tidyverse)
geomid <- function(lat, lon)
{
# http://www.geomidpoint.com/calculation.html
lat <- lat * pi / 180
lon <- lon * pi / 180
x <- mean(sum(cos(lat) * cos(lon)))
y <- mean(sum(cos(lat) * sin(lon)))
z <- mean(sum(sin(lat)))