Skip to content

Instantly share code, notes, and snippets.

View jaxvanyang's full-sized avatar
🦀

Jax Young jaxvanyang

🦀
  • China
  • 21:23 (UTC +08:00)
View GitHub Profile
@jaxvanyang
jaxvanyang / .bashrc
Last active August 24, 2023 05:18
Workaround for changing the default shell if you don't have write permission of `/etc/passwd`.
# change default shell from Bash to fish
if shopt -q login_shell; then
if ! command -v fish &> /dev/null; then
return
fi
clear
export SHELL=/usr/bin/fish
# clean Bash envs
@jaxvanyang
jaxvanyang / tfgets.c
Created May 6, 2022 09:21
fgets' timeout version
/**
* @file tfgets.c
* @author Jax ([email protected])
* @brief Homework 8.25: same as fgets, but with 5 seconds timeout
* @version 0.1
* @date 2022-05-03
*
* @copyright Copyright (c) 2022
*
*/