-
Different color themes for different projects (based on stackoverflow solution)
- Install peacock
- Press F1
- Type:
Change to a Favorit Color
-
Auto import modules in files
- Install Auto Import extension
-
Smooth Cursor
-
search cursor in setting
Multiple commands and nested commands in yargs
network publish add [options]
network publish delete [options]
network internet add[options]
how to install node.js on diban
- based on install nodejs
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
- nvm --version
- nvm install node
- based on stackoverflow solution
- Docker's internal repos is not supported on 20.04 yet so
- before installation
- use a proxy or vpn
sudo openconnect 986.9104.945.9196
- use a proxy or vpn
sudo apt-get install -y docker.io
based on stackoverflow answer- for getting images form dockerhub
- add nameserver of shekan to
/etc/resolve.conf
--(sudo /etc/resolve.conf)
- nameserver 192.168.1.58
- nameserver 192.168.1.100
based on this tutoral : link
git config --global credential.helper 'cache --timeout 7200'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stages: # List of stages for jobs, and their order of execution | |
- build | |
- test | |
- deploy | |
build-job: # This job runs in the build stage, which runs first. | |
stage: build | |
script: | |
- cd /home/user/projects/agent | |
- git pull |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const app = express(); | |
const fs = require('fs'); | |
app.get('/', (req, res) => { | |
const { size } = fs.statSync('input.txt'); | |
const readStreamfile = fs.createReadStream('input.txt', { | |
encoding: 'UTF-8', | |
start: 0, | |
end: size, | |
highWaterMark: 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@nestjs/common'; | |
import { CreateVideoDto } from './dto/create-video.dto'; | |
import { UpdateVideoDto } from './dto/update-video.dto'; | |
const allVideos = [ | |
{ | |
id: 1, | |
name: "tom-and-jerry", | |
duration: '3 mins', | |
title: 'Tom & Jerry' | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Controller, Get, Post, Body, Patch, Param, Delete, Res, HttpStatus, Header } from '@nestjs/common'; | |
import { VideoService } from './video.service'; | |
import { statSync, createReadStream } from 'fs'; | |
import { Headers } from '@nestjs/common'; | |
import { Response } from 'express'; | |
@Controller('video') | |
export class VideoController { | |
constructor(private readonly videoService: VideoService) { } | |
@Get('stream/:id') |
OlderNewer