Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@d1i1m1o1n
d1i1m1o1n / text
Created October 6, 2016 12:16
How to disable auto-save in phpstorm
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.
@parente
parente / postinstall.sh
Last active April 23, 2024 06:11
Post-install script to disable SSH password authentication, install latest Docker with AUFS on Ubuntu 14.04 VMs
#!/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 -"
@fnky
fnky / ANSI.md
Last active April 23, 2024 06:10
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@nzvtrk
nzvtrk / Dockerfile
Last active April 23, 2024 06:08
Nest.js multi-stage build dockerfile + docker-compose with postgres & migrations
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
@uubulb
uubulb / alpinebbr3.sh
Last active April 23, 2024 06:06
One-click script for installing BBRv3 kernel on Alpine Linux 3.19
#!/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

Slack Tech Communities

If you have a community to suggest, this is a growing list, & we'd love to add more.

General Tech

All Roles

@rootv890
rootv890 / Fragment Shader
Last active April 23, 2024 05:57
Shader Starters (ShaderMaterial)
void main()
{
gl_FragColor = vec4(0,0.7,1.0, 1.0);
}
@yashika51
yashika51 / nb-viewer.md
Last active April 23, 2024 05:55
Share your jupyter notebooks with nbviewer and Gist

How to share .ipynb files from your computer without using Colab or Binder?

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:

  • Find the notebook you want to share and open it with notepad.
  • Copy the raw code from there

image

@julyL
julyL / .prettierrc.js
Created March 9, 2020 06:17
.prettierrc.js配置文件
// .prettierrc.js
module.exports = {
// 一行最多 80 字符
printWidth: 80,
// 使用 2 个空格缩进
tabWidth: 2,
// 不使用缩进符,而使用空格
useTabs: false,
// 行尾需要有分号
semi: true,
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 23, 2024 05:50
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+