This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- I recently switched from alacritty to wezterm. Supports mouse scrolling, has builtin emoji and multi-tab support. So far so good. | |
-- The config is in lua that I don't know much about. But the official doc has an example config to start with. | |
-- Pull in the wezterm API | |
local wezterm = require 'wezterm' | |
-- This table will hold the configuration. | |
local config = {} | |
-- In newer versions of wezterm, use the config_builder which will |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// thanks to: | |
// https://github.com/uber-go/zap/blob/master/FAQ.md#does-zap-support-log-rotation | |
// https://studygolang.com/articles/17394 | |
// https://stackoverflow.com/questions/54395407/zap-logging-with-1-customized-config-and-2-lumberjack | |
// Please test and debug it before putting it in production. | |
package logger | |
import ( | |
"fmt" | |
"os" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 `~/`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE | |
// This gist was created long time ago. | |
// According to zap's doc, now we can use zapcore.AddSync to directly add lumberjack as a zap sync | |
// see https://github.com/uber-go/zap/blob/master/FAQ.md#does-zap-support-log-rotation | |
// So I wrote a new gist if anyone is interested: | |
// https://gist.github.com/rnyrnyrny/a6dc926ae11951b753ecd66c00695397 | |
// 下面的代码已经过时了,现在直接用zapcore.AddSync就行,参考zap文档 | |
// thanks to: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# test | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GIT heart FZF | |
# ------------- | |
is_in_git_repo() { | |
git rev-parse HEAD > /dev/null 2>&1 | |
} | |
fzf-down() { | |
fzf --height 50% "$@" --border | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" alias ':g' to ':tabnew google' | |
command g tabnew google |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set-option -g default-shell /bin/bash #up to you | |
unbind ^b | |
set -g prefix M-q | |
#set -g utf8 on | |
#set -g status-utf8 on | |
set-option -g focus-events on | |
set-option -sa terminal-overrides ',XXX:RGB' | |
bind R source-file ~/.tmux.conf \; display-message "Config reloaded..." | |
# Ctrl-Left/Right cycles thru windows (no prefix) | |
bind-key -n "M-Left" select-window -t :- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########## | |
# Tweaked Win10 Initial Setup Script | |
# Primary Author: Disassembler <disassembler@dasm.cz> | |
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences. | |
# Version: 2.12.1, 2018-03-15 | |
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script | |
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/ | |
# Tweak difference: | |
# | |
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
NewerOlder