Skip to content

Instantly share code, notes, and snippets.

@wizcas
wizcas / wslproxy-zh.sh
Last active November 26, 2021 07:08
WSL2 Proxy Enabler
#!/bin/bash
##########################################
# Copyrights 2020, Wizcas <chen@0x1c.dev>
#
# This script is under MIT license
##########################################
#----------- 辅助工具 -----------
####### 颜色码 ########
@wizcas
wizcas / valine.d.ts
Last active May 21, 2020 10:23
Valine TypeScript Type Declaration File
declare module 'valine' {
export interface ValineOptions {
el: string
appId: string
appKey: string
placeholder?: string
path?: string
avatar?: '' | 'mp' | 'identicon' | 'monsterid' | 'wavatar' | 'retro' | 'robohash' | 'hide'
meta?: ('nick' | 'mail' | 'link')[]
pageSize?: number
@wizcas
wizcas / profiles.json
Created October 19, 2019 16:24
My Windows Terminal Keybindings
{
"command" : "closeTab",
"keys" :
[
"ctrl+shift+w"
]
},
{
"command": "closePane",
"keys": [
@wizcas
wizcas / winterm-callout.ahk
Last active May 5, 2022 07:37
AHK Script for Calling Out Windows Terminal
; How much height of screen size the terminal window takes.
VRatio := 0.8
; The path to the Windows Terminal exe file.
WtPath = "%LOCALAPPDATA%\Microsoft\WindowsApps\wt.exe"
#SC29::ToggleTerminal()
ShowAndPositionTerminal()
{
ScreenX := GetScreenLeft()
@wizcas
wizcas / Makefile
Created September 4, 2019 08:44 — forked from klmr/Makefile
Self-documenting makefiles
# Example makefile with some dummy rules
.PHONY: all
## Make ALL the things; this includes: building the target, testing it, and
## deploying to server.
all: test deploy
.PHONY: build
# No documentation; target will be omitted from help display
build:
# Create the apt proxy config file
sudo vi /etc/apt/apt.conf.d/proxy.conf
# Add http & https proxies into the file
Acquire {
HTTP::proxy "http://127.0.0.1:7890";
HTTPS::proxy "http://127.0.0.1:7890";
}
@wizcas
wizcas / wsl.conf
Created September 3, 2019 15:36
wsl.conf
# Create or update this file at: /etc/wsl.conf
# Enable extra metadata options by default
[automount]
enabled = true
root = /
options = "metadata,umask=22,fmask=11"
mountFsTab = false
# Enable DNS – even though these are turned on by default, we’ll specify here just to be explicit.
[network]
@wizcas
wizcas / gitproxy.sh
Last active August 30, 2019 16:38
git代理配置工具 (WSL/Linux) | GIT PROXY CONFIG TOOL FOR WSL/LINUX
#!/bin/bash
echo -e "\
======================
GIT PROXY SETUP TOOL
by wizcas
======================
Prerequisites:
@wizcas
wizcas / VolumeControl.ahk
Last active October 6, 2022 09:34
Windows 10 Volume Control (Auto Hot Key Script)
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;===================================================================================================
;====================================== Volume OSD =================================================
;===================================================================================================
; Author: Sjc1000 ( Uptone Software )
;
@wizcas
wizcas / .zshrc
Last active December 24, 2021 20:44
.zshrc (essential)
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/wizcas/.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