Skip to content

Instantly share code, notes, and snippets.

View realyukii's full-sized avatar
👀
Observing the pattern

ReYuki realyukii

👀
Observing the pattern
View GitHub Profile
@realyukii
realyukii / cal.sh
Created August 28, 2024 00:23
expand day name on cal unix command
#!/usr/bin/sh
cal | python3 -c "
import sys
lines = sys.stdin.read().splitlines()
# Replace weekday abbreviations with full names, ensuring consistent spacing
header = lines[1]
header = header.replace('Su', 'Sunday ').replace('Mo', 'Monday ').replace('Tu', 'Tuesday ').replace('We', 'Wednesday').replace('Th', 'Thursday ').replace('Fr', 'Friday ').replace('Sa', 'Saturday ')
@realyukii
realyukii / commandline_mode.md
Last active August 29, 2024 11:48
Frequently used command in neovim

The list will be updated over time.

LSP

  1. view LSP status -> LspInfo (by nvim-lspconfig), checkhealth lsp
  2. used by -> lua vim.lsp.buf.references()

Preference

  1. revert color scheme -> colorscheme vim
  2. list available colorscheme -> echo globpath(&runtimepath, 'colors/*.vim')
@realyukii
realyukii / demo.c
Created October 14, 2024 14:29
math is cool!
#include <stdio.h>
/*
* A program to demonstrate inclusion principle in set theory.
* note: to change the parameter, you need to manually adjust the condition.
*
* */
int main(void)
{
int start = 1;