Skip to content

Instantly share code, notes, and snippets.

View Kvieta1990's full-sized avatar

Yuanpeng Zhang Kvieta1990

View GitHub Profile
@Kvieta1990
Kvieta1990 / Microsoft.PowerShell_profile.ps1
Last active February 9, 2022 03:11
Windows Powershell Configuration
Function dir_revised($a) {
gci $a | sort-object Name | format-table -AutoSize
}
Function la($a) {
gci $a | sort-object Name | format-table -AutoSize
}
Function lad($a) {
gci -Directory $a | sort-object Name | format-table -AutoSize
@Kvieta1990
Kvieta1990 / Microsoft.PowerShell_profile.ps1
Last active February 9, 2022 03:09
Powershell 7 Configuration
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
Function la($a) {
gci $a | sort-object Name
}
Function lad($a) {
gci -Directory $a | sort-object Name
}
@Kvieta1990
Kvieta1990 / Windows CMD Profile
Last active February 23, 2022 15:47
Windows DOS profile
@echo off
Title DOS
for %%* in (.) do set ADDRESS= %%~n*
prompt $E[1;30;40m[$E[1;35;40mZYP$E[1;34;40m-$E[1;32;40mDOS $E[1;31;40m@ $E[1;36;40m$d$E[1;30;40m]$E[1;31;40m$$$s$E[1;37;40m
:: Temporary system path at cmd startup
:: set PATH=%PATH%;"C:\Program Files\Sublime Text 2\"
call conda activate
@Kvieta1990
Kvieta1990 / WINCMD.INI
Last active January 2, 2022 21:38
Total Commander configuration
[Configuration]
RenameSelOnlyName=1
UseNewDefFont=1
SetEncoding=��.do.not.remove
firstmnu=1274
FirstTimeIconLib=0
FirstTime=0
SeparateTree=0
PanelsVertical=0
Aligned extension=1
@Kvieta1990
Kvieta1990 / .zshrc
Last active December 4, 2022 22:52
Home Windows10 WSL Ubuntu zshrc
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
@Kvieta1990
Kvieta1990 / .vimrc_general
Last active December 4, 2022 22:51
vim configuration files
" COPY THIS FILE AS .vimrc in home folder.
" cp vimrc ~/.vimrc
"
" .vimrc
"
" Smylers's .vimrc
" http://www.stripey.com/vim/
"
" 2000 Jun 1: for `Vim' 5.6
"
@Kvieta1990
Kvieta1990 / gedit.vbs
Created December 5, 2021 20:28
Windows shortcut for WSL Ubuntu apps
Set shell = CreateObject("WScript.Shell")
shell.CurrentDirectory = "E:\wsl_ubuntu_app"
shell.Run "cmd /c wsl-app-sudo-runner.bat gedit", 0, false
@Kvieta1990
Kvieta1990 / settings.json
Last active November 19, 2023 16:42
Home Win10 Windows Terminal Config
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command": "unbound",
"keys": "ctrl+c"
},
{
"command": "unbound",
@Kvieta1990
Kvieta1990 / kernel.json
Created January 12, 2022 18:42
Windows 10 JupyterLab server using WSL Ubuntu kernel
{
"argv": [
"C:\\windows\\system32\\wsl.exe",
"-d",
"Ubuntu",
"/home/yuanpeng/anaconda3/envs/py37/bin/python",
"-m",
"ipykernel_launcher",
"-f",
"$(wslpath -a '{connection_file}')"
@Kvieta1990
Kvieta1990 / wsl.conf
Created January 12, 2022 18:51
WSL mount Windows drive configuration
# Automatically mount Windows drive when the distribution is launched
[automount]
# Set to true will automount fixed drives (C:/ or D:/) with DrvFs under the root directory set above. Set to false means drives won't be mounted automatically, but need to be mounted manually or with fstab.
enabled = true
# Sets the directory where fixed drives will be automatically mounted. This example changes the mount location, so your C-drive would be /c, rather than the default /mnt/c.
# root = /
# DrvFs-specific options can be specified.