VS Code on iPad Pro: Difference between revisions
Jump to navigation
Jump to search
Line 261: | Line 261: | ||
sudo kubeadm init --pod-network-cidr=10.21.0.0/16 | sudo kubeadm init --pod-network-cidr=10.21.0.0/16 | ||
'''kubeconfig''' | |||
mkdir -p $HOME/.kube | |||
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config | |||
sudo chown $(id -u):$(id -g) $HOME/.kube/config | |||
'''network overlay''' | |||
kubectl apply -f\ | |||
https://docs.projectcalico.org/v3.14/manifests/calico.yaml | |||
'''join worker nodes''' | |||
kubeadm token create --print-join-command | |||
kubectl get nodes | |||
== Knowledge == | == Knowledge == |
Revision as of 17:12, 4 April 2022
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm -g install yarn
yarn global add code-server
~/.yarn/bin/code-server
| |
| |
vim ~/.config/code-server/config.yaml | |
| |
bind-addr: 127.0.0.1:8080
auth: none
password: academia
cert: false
|
bind-addr: 127.0.0.1:8080
auth: password
password: academia
cert: false
|
Service
sudo vim /etc/systemd/system/code-server.service [Unit]
Description=code-server
After=network.target
[Service]
User=ubuntu
Group=ubuntu
WorkingDirectory=/home/ubuntu
Environment="PATH=/usr/bin"
ExecStart=/home/ubuntu/.yarn/bin/code-server
[Install]
WantedBy=multi-user.target
sudo systemctl disable code-server.service sudo systemctl enable code-server.service sudo systemctl status code-server.service sudo systemctl start code-server.service sudo systemctl stop code-server.service blink » config » Hosts » New Host » SSH Config » New Host » Save # Compression no LocalForward 8080 127.0.0.1:8080 ExitOnForwardFailure yes |
Extension
~/.yarn/bin/code-server\
--install-extension msjsdiag.vscode-react-native --force\
--install-extension PKief.material-icon-theme --force\
--install-extension ckolkman.vscode-postgres --force\
--install-extension esbenp.prettier-vscode --force\
--install-extension ritwickdey.LiveServer --force
~/.yarn/bin/code-server\
--install-extension ms-kubernetes-tools.vscode-kubernetes-tools --force\
--install-extension ms-azuretools.vscode-docker --force\
--install-extension ms-python.python --force
~/.yarn/bin/code-server\
--install-extension iocave.customize-ui --force
Virtual Keyboard
iPad Pro » Settings » General » Keyboard » Auto-Correction » Disable iPad Pro » Settings » General » Keyboard » Shortcuts » Disable
Java GraalVM
export ACADEMIA_HOME="$HOME/.chorke/academia"
sudo mkdir -p /opt/cli
| |
| |
mkdir -p $ACADEMIA_HOME/etc/env/
cat << \EOF >> $ACADEMIA_HOME/etc/env/system.sh
# chorke academia env
export ACADEMIA_HOME="$HOME/.chorke/academia"
export ACADEMIA_DEV="$ACADEMIA_HOME/dev"
EOF
|
cat << \EOF >> $HOME/.bashrc
# chorke academia env
if [ -f "$HOME/.chorke/academia/etc/env/system.sh" ]; then
source $HOME/.chorke/academia/etc/env/system.sh
fi
EOF
|
| |
sudo wget -c https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/\
graalvm-ce-java17-linux-aarch64-22.0.0.2.tar.gz -P /opt/cli/
sudo tar -xvzf /opt/cli/graalvm-ce-java17-linux-aarch64-22.0.0.2.tar.gz -C /opt/cli/
sudo rm -rf /opt/cli/graalvm-ce-java17-linux-aarch64-22.0.0.2.tar.gz
export GRAALVM_HOME='/opt/cli/graalvm-ce-java17-22.0.0.2'
cat << \EOF >> $ACADEMIA_HOME/etc/env/system.sh
# chorke academia sys
export GRAALVM_HOME='/opt/cli/graalvm-ce-java17-22.0.0.2'
EOF
| |
| |
update-alternatives --query native-image
update-alternatives --query jconsole
update-alternatives --query jshell
update-alternatives --query javac
update-alternatives --query java
update-alternatives --query jdb
update-alternatives --query jps
update-alternatives --query gu
update-alternatives --query js
sudo update-alternatives --install /usr/bin/jconsole jconsole\
$GRAALVM_HOME/bin/jconsole 1983
sudo update-alternatives --install /usr/bin/jshell jshell\
$GRAALVM_HOME/bin/jshell 1983
sudo update-alternatives --install /usr/bin/javac javac\
$GRAALVM_HOME/bin/javac 1983
sudo update-alternatives --install /usr/bin/java java\
$GRAALVM_HOME/bin/java 1983
|
sudo update-alternatives --install /usr/bin/jdb jdb\
$GRAALVM_HOME/bin/jdb 1983
sudo update-alternatives --install /usr/bin/jps jps\
$GRAALVM_HOME/bin/jps 1983
sudo update-alternatives --install /usr/bin/js js\
$GRAALVM_HOME/bin/js 1983
sudo update-alternatives --install /usr/local/bin/gu gu\
$GRAALVM_HOME/bin/gu 1983
sudo gu install native-image
sudo update-alternatives --install\
/usr/bin/native-image native-image\
$GRAALVM_HOME/bin/native-image 1983
native-image --version
sudo gu --version
javac -version
java -version
|
Mobile Shell
sudo apt update sudo apt list --upgradable |
sudo apt upgrade sudo apt install mosh |
Kubernetes
sudo apt remove docker docker-engine docker.io containerd runc sudo apt install ca-certificates curl gnupg lsb-release
sudo su
cat << \EOF >> /etc/docker/daemon.json
{
"exec-opts": [
"native.cgroupdriver=systemd"
],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2"
}
EOF
exit
sudo vim /boot/firmware/cmdline.txt
net.ifnames=0 dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=LABEL=writable rootfstype=ext4 elevator=deadline rootwait fixrtc cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1 swapaccount=1
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=arm64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - cat << EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list deb https://apt.kubernetes.io/ kubernetes-xenial main EOF
sudo apt update && sudo apt install -y apt-transport-https curl sudo apt install -y docker-ce=5:20.10.14~3-0~ubuntu-focal\ kubelet=1.23.5-00 kubeadm=1.23.5-00 kubectl=1.23.5-00 sudo apt-mark hold docker-ce kubelet kubeadm kubectl
echo "net.bridge.bridge-nf-call-iptables=1" |\ sudo tee -a /etc/sysctl.conf sudo sysctl -p
sudo kubeadm init --pod-network-cidr=10.21.0.0/16
kubeconfig mkdir -p $HOME/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config
network overlay kubectl apply -f\ https://docs.projectcalico.org/v3.14/manifests/calico.yaml
join worker nodes kubeadm token create --print-join-command kubectl get nodes
Knowledge
dpkg --print-architecture apt-cache madison kubelet apt-cache madison kubeadm apt-cache madison kubectl apt-cache madison docker-ce
sudo systemctl daemon-reload sudo apt purge docker-ce kubelet kubeadm kubectl sudo apt-mark unhold docker-ce kubelet kubeadm kubectl
sudo npm install -g --unsafe-perm=true --allow-root curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash - curl -fsSL https://rpm.nodesource.com/setup_14.x | sudo bash -
add the new key(s) to known_hosts ssh-keyscan -H dev.chorke.org >> ~/.ssh/known_hosts remove the old key(s) from known_hosts ssh-keygen -R dev.chorke.org