Skip to content

Instantly share code, notes, and snippets.

View keidarcy's full-sized avatar
🏖️
On vacation

Xing Yahao keidarcy

🏖️
On vacation
View GitHub Profile
@keidarcy
keidarcy / .zshrc
Created February 13, 2021 05:35
default ohmyzsh config
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/dst/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="robbyrussell"
@keidarcy
keidarcy / webpack.config.ts
Created May 23, 2021 13:47
react-ts-webpack5
import path from 'path';
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import webpack from 'webpack';
// import HtmlWebpackPlugin from 'html-webpack-plugin';
const currentScript = process.env.npm_lifecycle_event;
console.log({ currentScript });
@keidarcy
keidarcy / key.json
Created August 16, 2021 12:14
vscode keybind
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "cmd+n", // "cmd+n" on mac
"command": "extension.advancedNewFile",
},
{
"key": "escape", // cancel for vim multi-cursor mode
"command": "removeSecondaryCursors",
"when": "editorHasMultipleSelections && textInputFocus"
@keidarcy
keidarcy / helper.d.ts
Created September 26, 2021 08:43
type helpers
export type Expect<T extends true> = T
export type ExpectTrue<T extends true> = T
export type ExpectFalse<T extends false> = T
export type IsTrue<T extends true> = T
export type IsFalse<T extends false> = T
export type NotEqual<X, Y> = true extends Equal<X, Y> ? false : true
export type Equal<X, Y> =
(<T>() => T extends X ? 1 : 2) extends
(<T>() => T extends Y ? 1 : 2) ? true : false
@keidarcy
keidarcy / emoji.txt
Last active March 15, 2025 02:36
Plain Github emoji list
:bowtie:
😄 :smile:
😆 :laughing:
😊 :blush:
😃 :smiley:
☺️ :relaxed:
😏 :smirk:
😍 :heart_eyes:
😘 :kissing_heart:
😚 :kissing_closed_eyes:
@keidarcy
keidarcy / .omt.sh
Last active November 23, 2021 06:14
oh my tmux sh
# oh my tmux https://github.com/gpakosz/.tmux
# require (perl, curl, tmux, git)
tmux_config_local='.tmux.conf.local'
cd ~
git clone https://github.com/gpakosz/.tmux.git
[ -f ~/dotfiles/tmux/$tmux_config_local ] && ln -sf ~/dotfiles/tmux/$tmux_config_local ~/.tmux/$tmux_config_local
ln -sf ~/.tmux/$tmux_config_local ~/$tmux_config_local
ln -sf ~/.tmux/.tmux.conf ~/.tmux.conf
# tmux source-file ~/.tmux.conf # reload tmux config
@keidarcy
keidarcy / jq-examples.md
Last active January 16, 2022 08:11
jq examples

Simple jq command

select, -r, length, reverse

curl -s "https://jsonplaceholder.typicode.com/todos" | jq '.[].completed'
curl -s "https://jsonplaceholder.typicode.com/todos" | jq '.[] | select(.completed==true)'
@keidarcy
keidarcy / Gruvbox.md
Created January 24, 2022 02:22
gruvbox slack
  • dark
#282828,#3c3836,#98971a,#fbf1c7,#3E313C,#EBDBB2,#b8bb26,#fb4934,#3c3836,#EBDBB2
  • light
#282828,#3c3836,#98971a,#fbf1c7,#3E313C,#EBDBB2,#b8bb26,#fb4934,#3c3836,#EBDBB2
@keidarcy
keidarcy / alacritty.sytax.yml
Last active February 7, 2022 13:16
Alacritty default config file
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Import additional configuration files
#
# Imports are loaded in order, skipping all missing files, with the importing
# file being loaded last. If a field is already present in a previous import, it
# will be replaced.
#
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
@keidarcy
keidarcy / educative-student-pack.md
Created February 12, 2022 04:46
Educative Student Pack included courses
Title author level
JavaScript Fundamentals Before Learning React Robin Wieruch beginner
Software Design Patterns: Best Practices for Software Developers C. H. Afzal beginner
Modern C++ Concurrency: Get the most out of any machine Rainer Grimm advanced
Intermediate JavaScript: Building Frontend Components Educative intermediate
C++ Standard Library including C++ 14 & C++ 17 Rainer Grimm beginner
Complete JavaScript Course: Build a Real World App from Scratch Baptiste Pesquet beginner
An Introduction to Programming in Go Educative beginner
C++17 in Detail: A Deep Dive Bartłomiej Filipek beginner