Skip to content

Instantly share code, notes, and snippets.

@sun0day
sun0day / .vimrc
Last active April 26, 2025 04:43
vim config for rust & typescript
syntax on
set re=0
set relativenumber
set nocompatible
set number
set shiftwidth=2
set tabstop=2
set expandtab
set encoding=utf-8
set nobackup
@sun0day
sun0day / getPRByUser.js
Created January 11, 2023 06:15
github user's pr statistics
function groupByRepo(prs) {
const obj = {}
prs.forEach(({ repository_url, state }) => {
const repo = repository_url.match(/([^\/]+\/[^/]+)$/)[0]
obj[repo] = obj[repo] || {open: 0, closed: 0, merged: 0}
obj[repo][state] = obj[repo][state] + 1
})