Skip to content

Instantly share code, notes, and snippets.

View pdr-tuche's full-sized avatar
:octocat:
little media, lots of code ❌🧢

Pedro Neves pdr-tuche

:octocat:
little media, lots of code ❌🧢
View GitHub Profile
@pdr-tuche
pdr-tuche / youtube.md
Created November 22, 2022 04:51 — forked from bitsurgeon/youtube.md
Markdown cheatsheet for YouTube

Embed YouTube Video in Markdown File

  1. Markdown style
[![Watch the video](https://img.youtube.com/vi/nTQUwghvy5Q/default.jpg)](https://youtu.be/nTQUwghvy5Q)
  1. HTML style
<a href="http://www.youtube.com/watch?feature=player_embedded&v=nTQUwghvy5Q" target="_blank">
@pdr-tuche
pdr-tuche / default nginx configuration file
Created November 17, 2023 23:41 — forked from xameeramir/default nginx configuration file
The default nginx configuration file inside /etc/nginx/sites-available/default
# Author: Zameer Ansari
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@pdr-tuche
pdr-tuche / comandos-docker
Created February 16, 2024 17:55 — forked from morvanabonin/comandos-docker
Comandos do Docker
Segue a lista de comandos docker e sua utilidade:
docker attach – Acessar dentro do container e trabalhar a partir dele.
docker build – A partir de instruções de um arquivo Dockerfile eu possa criar uma imagem.
docker commit – Cria uma imagem a partir de um container.
docker cp – Copia arquivos ou diretórios do container para o host.
docker create – Cria um novo container.
docker diff – Exibe as alterações feitas no filesystem do container.
docker events – Exibe os eventos do container em tempo real.
docker exec – Executa uma instrução dentro do container que está rodando sem precisar atachar nele.
@pdr-tuche
pdr-tuche / express_async_errors.js
Created February 19, 2024 04:30 — forked from luizomf/express_async_errors.js
Express Async Errors
/* Express Route Adapter */
const resolver = (handlerFn) => {
return (req, res, next) => {
return Promise.resolve(handlerFn(req, res, next))
.catch(e => next(e));
}
}
/* Errors */
class InternalServerError extends Error {