Skip to content

Latest commit

 

History

History
552 lines (431 loc) · 18.9 KB

global-readme.org

File metadata and controls

552 lines (431 loc) · 18.9 KB

my global-hardware config

1 Tool Pack

  • [X] GitKraken Glo

2 Myself

3 Nix

3.1 Macos

sudo mount -uw / && sudo ln -s /System/Volumes/Data/nix /nix
 curl https://nixos.org/nix/install | sh
  . /Users/gtrun/.nix-profile/etc/profile.d/nix.sh

3.1.1 Channel

nix-channel --add https://github.com/NixOS/nixpkgs/archive/nixpkgs-19.09-darwin.tar.gz nix-darwin

3.2 Debian

wget https://github.com/hardenedlinux/NSM-data-analysis/releases/download/nix/nix_2.3_master_e3eecb5_amd64.deb
sudo dpkg -i nix_2.3_master_e3eecb5_amd64.deb
sudo ln -s /opt/nix-multiuser/nix/bin/nix* /usr/local/bin

nix-channel --add https://nixos.org/channels/nixos-19.09 nixpkgs
nix-channel --update
export NIX_PATH="$HOME/.nix-defexpr/channels/nixpkgs"
##for Julia CUDA
export NIXPKGS_ALLOW_UNFREE=1

source /opt/nix-multiuser/nix/etc/profile.d/nix.sh

4 Img/Photo

5 virtual

5.1 ESXI

  • SSD 225GB
  • 2T extended

5.2 devops

6 Global

6.1 font

6.1.1 ttf-monaco

6.2 terminal

  • State “✔ DONE” from “⚔ STARTED” [2019-09-03 Tue 00:16]
  • State “✘ CANCELED” from [2019-09-03 Tue 00:16]
    to Kitty
  • State “✘ CANCELED” from [2019-09-03 Tue 00:17]
    to kitty

6.3 BASH/theme

6.3.1 fish

6.3.2 package

brew install rxvt-unicode

6.4 Download

6.5 ssh

6.5.2 Termius

7 window

8 theme

8.1 GTK

8.2 latex

8.3 KDE

9 Brower

10 Lang

10.1 grammer

cargo install tree-sitter-cli

10.2 Python

10.2.1 macos

brew install libxml2v

10.2.2 LSP

brew cask install dotnet-sdk
git clone https://github.com/Microsoft/python-language-server.git
cd python-language-server/src/LanguageServer/Impl
dotnet publish -c Release -r osx-x64   
chmod a+x $(git rev-parse --show-toplevel)/output/bin/Release/osx-x64/publish/Microsoft.Python.LanguageServer
git clone https://github.com/Microsoft/python-language-server.git
cd python-language-server/src/LanguageServer/Impl
dotnet publish -c Release -r linux-x64
chmod a+x $(git rev-parse --show-toplevel)/output/bin/Release/linux-x64/publish/Microsoft.Python.LanguageServer

10.2.3 Anaconda

pip3 install python-Levenshtein
conda install -c conda-forge python-language-server 

10.3 go

10.3.1 LSP

git clone -b bingo https://github.com/saibing/tools.git
cd tools/gopls
go install

10.4 Rust

10.4.1 macos

10.4.1.1 Basic install

brew install rust

10.5 C++

10.5.1 ccls

10.5.1.1 linux

Build · MaskRay/ccls Wiki

10.5.1.2 macos

brew update
brew install ccls

10.6 R

10.6.1 package

install.packages('IRkernel')
install.packages('repr')
pbdZMQ
install.packages('pbdZMQ')
library(devtools)
install_github("RBigData/pbdZMQ")

10.6.2 kernel

install.packages('IRkernel')
IRkernel::installspec()
brew tap homebrew/science
brew install Caskroom/cask/xquartz
brew install r

11 Emacs

11.1 Download

11.2 OX-hugo

11.2.1 macos

link image to static

ln -s /Users/gtrun/Dropbox/application/blog/content/static/ox-hugo /Users/gtrun/Dropbox/application/blog/static

11.3 mu4e

pengpengxp.github.io/2017-08-24-emacs-use-mu4e.org at b22281c3fe3a337c6a6bf37785ebf07ec6ee9a94 · pengpengxp/pengpengxp.github.io

12 exporting

12.1 Latex

13 Input method

13.1 Rime 输入法

cd ~/Library/Rime
import_tables:
  - luna_pinyin
  - luna_pinyin.sgmain
  - luna_pinyin.poetry
  - luna_pinyin.cn_en
  - luna_pinyin.english
  - luna_pinyin.computer
  - luna_pinyin.chat
  - luna_pinyin.biaoqing

13.1.1 Macos

brew cask install squirrel

curl -fsSL https://git.io/rime-install | bash

13.1.2 扩展词库

13.1.3 librime

13.1.3.1 macos

brew install yaml-cpp leveldb opencc

 git clone https://github.com/google/googletest
cd googletest
mkdir build
cd build
cmake ..
make
make install

git clone git://github.com/s-yata/marisa-trie.git
cd marisa-trie
autoreconf -i
./configure
make
make install

sudo cp /Library/Input\ Methods/Squirrel.app/Contents/Frameworks/librime.1.dylib /usr/local/lib

14 Manager

14.1 Python

14.2 Cpython

14.3 PASSWORD_MANAGER

14.3.2 enpass

14.4 Notes & self

15 Music

  • download youtube-dle
brew install mpv

, just change all the relative import statements as follows from .music_api import YoutubePlayer to from music_api import YoutubePlayer

16 Version Control

16.1 visual

17 Macos

17.1 Clean

find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch

18 Anaylsis

19 Data/Disk

19.1 Macos/IOS

diskutil list
diskutil unmountDisk /dev/disk5
sudo dd bs=1m if=/Users/gtrun/Downloads/nixos-graphical-19.03.173292.65729e08178-x86_64-linux.iso of=/dev/rdisk4

20 Bash

20.2 zsh

20.3 fish

20.3.4 ✰ Important color

21 Version control

21.1 Client

21.2 Git

22 Qemu

22.1 Debian

22.1.1 global

apt-get install sudo 
echo "test ALL=(ALL:ALL) ALL" >> /etc/sudoers
sudo apt-get update 
sudo apt build-dep emacs25 -y
sudo apt-get install mailutils

mkdir ~/src
cd ~/src
wget https://github.com/emacs-mirror/emacs/archive/emacs-26.3-rc1.tar.gz

tar -xvf emacs-26.3-rc1.tar.gz
cd emacs-emacs-26.3-rc1/

./autogen.sh
./configure --with-mailutils
make -j8 all & sudo make install

sudo apt-get install zsh git curl ripgrep silversearcher-ag w3m -y
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt"
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"

22.1.2 emacs

git clone https://github.com/GTrunSec/my-nsm-emacs.git ~/.emacs.d
rm -rf ~/.emacs.d
scp -r  test@10.220.170.150:~/.emacs.d ~/.emacs.d

22.2 machine ip

22.2.1 NSM-manager

ssh test@10.220.170.150 #NSM-sensor1

echo "
auto lo
iface lo inet loopback
auto enp1s0
auto enp8s0
# The primary network interface

#allow-hotplug enp1s0
iface enp1s0 inet static
address 10.220.170.150
netmask 255.255.255.0
gateway 10.220.170.94

#allow-hotplug enp1s0
iface enp8s0 inet static
address 192.168.122.20
netmask 255.255.255.0
gateway 192.168.122.1  

" > /etc/network/interfaces

22.2.2 NSM-Sensor1

ssh test@10.220.170.151 #NSM-sensor1

echo "
auto lo
iface lo inet loopback
auto enp1s0
# The primary network interface

#allow-hotplug enp1s0
iface enp1s0 inet static
address 10.220.170.151
netmask 255.255.255.0
gateway 10.220.170.94

" > /etc/network/interfaces

22.2.3 NSM-Sensor2

ssh test@10.220.170.152 #NSM-sensor2

echo "
auto lo
iface lo inet loopback
auto enp1s0
auto enp9s0
# The primary network interface

#allow-hotplug enp1s0
iface enp1s0 inet static
address 10.220.170.152
netmask 255.255.255.0
gateway 10.220.170.94


iface enp9s0 inet static
address 192.168.122.22                                                                                                  netmask 255.255.255.0
gateway 192.168.122.1

" > /etc/network/interfaces

23 Network

23.2 block-life

23.2.1 Browser

23.3 ✰ Important docker-adguardhome

docker pull adguard/adguardhome
sudo docker stop adguardhome                                            
 sudo docker rm adguardhome
sudo docker run --name adguardhome -v /my/own/workdir:/opt/adguardhome/work -v /my/own/confdir:/opt/adguardhome/conf --net=host -p 67:67/udp -p 80:80/tcp -p 443:443/tcp -p 853:853/tcp -p 3000:3000/tcp -d adguard/adguardhome

24 Keyboard

24.1 Plankck

25 Blog

25.3 Jekyll

  • osx
sudo rm -rf /Library/Ruby/
sudo chown $USER /Library/Ruby/
gem install bundler jekyll
ruby-bundle install

26 Docker

27 Book

27.1 Polar BookShelf

28 encrypt

29 check

29.1 spell

30 Organize

30.1 TMSU

32 Monitor

33 Macos Nix

sh <(curl https://nixos.org/nix/install) --daemon
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
ln -s ~/.config/nixpkgs/darwin/ ~/.nixpkgs
sudo launchctl stop org.nixos.nix-daemon
sudo launchctl start org.nixos.nix-daemon

34 editing