Skip to content

Instantly share code, notes, and snippets.

@tenthree
tenthree / .wezterm.lua
Created July 25, 2025 03:28
wezterm config
-- Pull in the wezterm API
local wezterm = require("wezterm")
-- This will hold the configuration.
local config = wezterm.config_builder()
config.font = wezterm.font("JetBrains Mono")
-- For example, changing the color scheme:
config.color_scheme = "Everforest Dark (Gogh)"
@tenthree
tenthree / config.toml
Last active July 24, 2025 08:20
helix editor settings
theme = "override"
[editor]
line-number = "relative"
bufferline = "always"
mouse = false
true-color = true
end-of-line-diagnostics = "hint"
[editor.cursor-shape]
@tenthree
tenthree / tmux.conf
Last active July 25, 2025 06:10
tmux.conf
# reload config
bind r source-file ~/.config/tmux/tmux.conf \; display-message "~/.config/tmux/tmux.conf reloaded"
# custom prefix key `
unbind C-b
set -g prefix `
bind ` send-prefix
# true colors support
set -g default-terminal "${TERM}"
@tenthree
tenthree / save_my_ass.md
Last active November 22, 2024 06:39
Find dropped stash after closing the terminal
# find dangling commit hash in the git history
git fsck --no-reflog | awk '/dangling commit/ {print $3}'

# view in git log
glog $(git fsck --no-reflog | awk '/dangling commit/ {print $3}')

# then apply it back
git stash apply {dropped_stash_hash}
@tenthree
tenthree / _vue.config.js
Last active January 15, 2021 12:52
@vue/cli project configure example (with default scss settings)
// --------------------------------------------------
// require modules
// --------------------------------------------------
const pkg = require('./package.json')
const path = require('path').posix
const exec = require('child_process').execSync
const BannerPlugin = require('webpack/lib/BannerPlugin.js')
// --------------------------------------------------
// Prerender routes
@tenthree
tenthree / recipe123.md
Last active September 1, 2020 11:17
recipe123

煮給1號2號吃的3號筆記

螞蟻上樹

準備

  • 溫水 泡開冬粉 20 分鐘 (防止結塊)

製作

  • 熱鍋加油 中火 蒜末 + 薑末 爆香
  • 下豬絞肉 小火 翻炒逼油
@tenthree
tenthree / example.go
Last active April 1, 2020 12:02
create an indexless dir filesystem instead of http.Dir for http.FileServer
package main
import "net/http"
func main() {
mux := http.NewServeMux()
// add a "/files" route from the "./static" directory, http://localhost:8080/files/{file}
mux.Handle("/files/", http.StripPrefix("/files/", http.FileServer(utils.NewIndexlessDir("./static"))))
http.ListenAndServe(":8080", mux)
}
@tenthree
tenthree / webpack.config.js
Created March 16, 2020 12:04
config sass-loader for angular9 with @angular-builders/custom-webpack
// steps:
//
// [1] install @angular-builders/custom-webpack
//
// [2] update angular.json for custom webpack configuration
//
// "architect": {
// "build": {
// // "builder": "@angular-devkit/build-angular:browser",
// "builder": "@angular-builders/custom-webpack:browser",
@tenthree
tenthree / user_aliases.cmd
Created January 17, 2020 06:23
windows cmder alias config
;= @echo off
;= rem Call DOSKEY and use this file as the macrofile
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
;= rem In batch mode, jump to the end of the file
;= goto:eof
;= Add aliases below here
e.=explorer .
gs=git status $*
gb=git branch -a $*
gc=git checkout $*
@tenthree
tenthree / cmder_wsl_zsh.bat
Created January 14, 2020 16:18
cmder start with WSL/zsh
set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -cur_console:pm:/mnt -cur_console:t:"zsh" -t zsh -l