Skip to content

Instantly share code, notes, and snippets.

@chux0519
Last active June 5, 2020 04:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chux0519/12d0a0cbe1ab2b2556a34c8df128dea2 to your computer and use it in GitHub Desktop.
Save chux0519/12d0a0cbe1ab2b2556a34c8df128dea2 to your computer and use it in GitHub Desktop.
Linux Setup
[user]
email = chuxdesign@hotmail.com
name = chux0519
[core]
excludesfile = ~/.gitignore
editor = nvim
[merge]
tool = kdiff3
[mergetool]
prompt = false
keepBackup = false
keepTemporaries = false
[mergetool "kdiff3"]
cmd = kdiff3 $BASE $LOCAL $REMOTE -o $MERGED
set-option -g prefix C-a
# VIM mode
set -g mode-keys vi
# Mouse friendly
set -g mouse on
# Move between panes with vi keys
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# copy to X clipboard
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe 'xclip -in -selection clipboard &> /dev/null'
bind -T copy-mode-vi Enter send-keys -X cancel
#!/bin/sh
[ -f "$HOME/.xprofile" ] && . ~/.xprofile
exec i3
#!/bin/sh
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export EDITOR="nvim"
export TERMINAL="sakura"
export BROWSER="firefox"
export READER="zathura"
setxkbmap -option ctrl:nocaps &
xmodmap -e "keycode 37=" &
xset r rate 300 50 &
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$HOME/.cargo/bin:$HOME/.yarn/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/chux0519/.oh-my-zsh"
export Qt5_DIR=/Users/chux0519/Qt/5.12.4/clang_64/lib/cmake/Qt5
export C_INCLUDE_PATH=/usr/local/include
export CPLUS_INCLUDE_PATH=/usr/local/include
export LIBRARY_PATH=/usr/X11/lib:/usr/local/lib
# 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/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="robbyrussell"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to automatically update without prompting.
# DISABLE_UPDATE_PROMPT="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS=true
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
alias pc="proxychains4"
alias dc="docker"
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/chux0519/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/chux0519/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/Users/chux0519/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/chux0519/google-cloud-sdk/completion.zsh.inc'; fi

Ubuntu Setup

proxychains4

sudo apt install proxychains4

vi /etc/proxychains4.conf

docker

see docker's site

fish

sudo apt install fish

chsh -s /usr/bin/fish

rust

curl https://sh.rustup.rs -sSf | sh

sudo apt install build-essential

tmux

sudo apt install tmux

set-option -g prefix C-a

Neovim

nvim

sudo apt-get install software-properties-common
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:neovim-ppa/stable
sudo apt-get update
sudo apt-get install neovim
sudo apt-get install python-dev python-pip python3-dev python3-pip

vim plug

curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

coc vim

curl -sL install-node.now.sh/lts | bash
# Optional install yarn if you want install extension by CocInstall command
curl --compressed -o- -L https://yarnpkg.com/install.sh | bash

and add to nvim config file

Plug 'neoclide/coc.nvim', {'branch': 'release'}

git

git config --global user.name "chux0519"
git config --global user.email "chuxdesign@hotmail.com"
git config --global core.editor "nvim"
git config --global core.excludesfile "~/.gitignore"

gcloud

install: https://cloud.google.com/sdk/docs/downloads-versioned-archives

gcloud config set proxy/type socks5
gcloud config set proxy/address 127.0.0.1
gcloud config set proxy/port 1080

yay

git clone yay

pacman -S gcc-go

1. wifi-menu
2. timedatectl set-ntp true
3. lsblk
- fdisk /dev/nvme0n1
- n +260M (efi)
- n +24G (swap)
- n +100G (/)
- n (/home)
4. mkfs.ext4 /dev/nvme0n1p3 | 4
- mkfs.vfat -F32 /dev/nvme0n1p1
- mkswap /dev/nvme0n1p2, swapon /dev/nvme0n1p2 (P2)
5. mount /dev/nvme0n1p3 /mnt (P3)
- mkdir -p /mnt/boot/efi (P1)
- mkdir -p /mnt/home (P4)
6. vim /etc/pacman.d/mirrorlist
7. pacstrap /mnt base base-devel vim
8. genfstab -U /mnt >> /mnt/etc/fstab
9. arch-chroot /mnt
10. pacman -S networkManager && systemctl enable NetworkManager
11. pacman -S grub-efi-x86_64 efibootmgr
12. grub-install --efi-directory=/boot/efi
13. grub-mkconfig -o /boot/grub/grub.cfg
14. exit && umount -R /mnt
> for x in $(cat package_list.txt); do pacman -S $x; done
autoconf
automake
awesome-terminal-fonts
bash
binutils
bison
bzip2
coreutils
cryptsetup
device-mapper
dhcpcd
diffutils
dmenu
e2fsprogs
efibootmgr
fakeroot
fcitx
file
filesystem
findutils
firefox
flex
gawk
gcc
gcc-libs
gettext
git
glibc
grep
groff
grub
gucharmap
gzip
i3-gaps
i3lock
i3status
inetutils
iproute2
iputils
jfsutils
kitty
less
libtool
licenses
lightdm
lightdm-gtk-greeter
linux
linux-firmware
logrotate
lvm2
m4
make
man-db
man-pages
mdadm
mpd
nano
neovim
netctl
networkmanager
otf-font-awesome
pacman
patch
pavucontrol
pciutils
perl
pkgconf
polybar
procps-ng
proxychains-ng
psmisc
pulseaudio
pulseaudio-alsa
pulseaudio-bluetooth
pulsemixer
reiserfsprogs
s-nail
sed
shadow
siji-git
sudo
sysfsutils
systemd
systemd-sysvcompat
tar
terminator
terminus-font
termsyn-font
texinfo
tmux
ttf-dejavu
ttf-font-awesome
ttf-unifont
usbutils
util-linux
vi
vim
wget
which
wqy-microhei
wqy-zenhei
xclip
xfsprogs
xorg-server
xorg-xbacklight
xorg-xdpyinfo
xorg-xinit
xorg-xwininfo
xterm
yay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment