Skip to content

Instantly share code, notes, and snippets.

# Shell
### Check Shell
echo $SHELL
### Switch Shell
chsh -s /bin/bash
# https://www.prisma.io/blog/nestjs-prisma-rest-api-7D056s1BmOL0
# install
npm install -D prisma
# initilize
npx prisma init
# run migrate
npx prisma migrate dev --name "init"
  • app interface
  • ...args
  • args...

redis-cli --scan --pattern otp:0903441084:* | xargs redis-cli del

Edit ssh config :

Edit /etc/ssh/sshd_config

AllowTcpForwarding yes
PermitTunnel yes

Restart ssh service

@swdream
swdream / k8s.md
Last active November 19, 2018 03:55

Master machine components

Etcd

  • Lưu trữ configuration files được sử dụng bởi các node trong cluster
  • là high availability key value store có thể được đặt trong nhiều node
  • nó chưá một số sensitive info và được access bởi kubenetes API server

API server

#!/bin/bash
set -ex

cd /tmp
curl -O https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz
tar xvf go1.10.3.linux-amd64.tar.gz

mkdir ~/go
1c7be5bb5b4e779c2d252bf276cb06e3da0bfa5c75a3d48caa3de99af110b558
@swdream
swdream / cache_sbt.md
Last active September 21, 2018 06:45
# some parts originally from https://github.com/randm-ch/units-of-information/blob/master/.gitlab-ci.yml

image: "hseeberger/scala-sbt:8u141-jdk_2.12.3_1.0.2"

variables:
  SBT_OPTS: "-Dsbt.global.base=sbt-cache/sbtboot -Dsbt.boot.directory=sbt-cache/boot -Dsbt.ivy.home=sbt-cache/ivy"
  COURSIER_CACHE: sbt-cache/coursier #only needed if you use coursier