Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
How to disable auto-save: | |
Go to File > Settings (Ctrl+Alt+S). | |
Go to Appearance & Behavior > System Settings. | |
Make sure the two are unchecked: | |
Save files on frame deactivation | |
Save files automatically if application is idle for x sec. | |
Go to Editor > General > Editor Tabs | |
Put a checkmark on "Mark modified files with asterisk" | |
(Optional but recommended) Under "Tab Closing Policy", select "Close non-modified files first". You may also want to increase the number of allowed tabs. | |
Click Apply > OK. |
#!/bin/bash | |
# Disable password authentication | |
sudo grep -q "ChallengeResponseAuthentication" /etc/ssh/sshd_config && sed -i "/^[^#]*ChallengeResponseAuthentication[[:space:]]yes.*/c\ChallengeResponseAuthentication no" /etc/ssh/sshd_config || echo "ChallengeResponseAuthentication no" >> /etc/ssh/sshd_config | |
sudo grep -q "^[^#]*PasswordAuthentication" /etc/ssh/sshd_config && sed -i "/^[^#]*PasswordAuthentication[[:space:]]yes/c\PasswordAuthentication no" /etc/ssh/sshd_config || echo "PasswordAuthentication no" >> /etc/ssh/sshd_config | |
sudo service ssh restart | |
# Install latest Docker | |
sudo apt-get update | |
sudo apt-get -y install linux-image-extra-$(uname -r) | |
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -" |
FROM node:12.14.1-alpine AS build | |
# If you have troubles with node-gyp use should install these dependencies | |
RUN apk add g++ make python | |
WORKDIR /app | |
COPY package*.json ./ | |
RUN npm ci | |
COPY . ./ | |
# build js & remove devDependencies from node_modules |
#!/bin/bash | |
[ -e /etc/os-release ] && cat /etc/os-release | grep -i "PRETTY_NAME" | grep -qi "Alpine Linux v3.19" && os_alpine='1' | |
pre_check() { | |
apk add virt-what | |
[ "$os_alpine" != 1 ] && echo "本脚本仅支持 Alpine 3.19!" && exit 1 | |
# check root |
If you have a community to suggest, this is a growing list, & we'd love to add more.
void main() | |
{ | |
gl_FragColor = vec4(0,0.7,1.0, 1.0); | |
} |
The most easiest way to share the .ipynb files without using Colab or Binder is by using Gist+nbviewer.
nbviewer helps you to share your jupyter notebooks as static sites. Follow these steps to share notebooks as url:
// .prettierrc.js | |
module.exports = { | |
// 一行最多 80 字符 | |
printWidth: 80, | |
// 使用 2 个空格缩进 | |
tabWidth: 2, | |
// 不使用缩进符,而使用空格 | |
useTabs: false, | |
// 行尾需要有分号 | |
semi: true, |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
Ubuntu 16.04+、Debian 8+、CentOS 7+