POST для создания новых ресурсов
POST для остальных кастомных глаголов
PATCH для обновления ресурсов. В 99,99% на обновление уходят не все поля ('created_at' и 'updated_at' так точно)
На PUT можно забить =)
This file contains 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
#!/bin/bash | |
# Script for run localtunnel | |
# https://github.com/localtunnel/localtunnel | |
##### Constants | |
SUBDOMAIN='name' | |
PORT=8080 |
This file contains 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
# ================================= | |
# List all node_modules | |
# Linux. | |
$ cd documents | |
$ find . -name "node_modules" -type d -prune -print | xargs du -chs | |
# Windows | |
$ cd documents | |
$ FOR /d /r . %d in (node_modules) DO @IF EXIST "%d" echo %d" |
This file contains 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
# Prune images | |
$ docker image prune | |
or | |
$ docker image prune -a | |
# Prune containers | |
$ docker container prune | |
# Prune volumes | |
$ docker volume prune |
This file contains 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
((nm, tm) => { | |
const lStorage = localStorage; | |
const sStorage = sessionStorage; | |
const tabId = sStorage.getItem(tm) | |
|| ((newId) => { | |
sStorage.setItem(tm, newId); | |
return newId; | |
})((Math.random() * 1e8).toFixed()); | |
const update = (setTabValue) => { | |
let currentValue = JSON.parse(lStorage.getItem(nm) || '{}'); |
NewerOlder