- How to handle SSH keys with ec2-github actions https://zellwk.com/blog/github-actions-deploy/
- SSH_PRIVATE_KEY
- HOST_NAME / IP_ADDRESS
- USER_NAME
# Place a copy of this config to ~/.aerospace.toml | |
# After that, you can edit ~/.aerospace.toml to your liking | |
# It's not necessary to copy all keys to your config. | |
# If the key is missing in your config, "default-config.toml" will serve as a fallback | |
# You can use it to add commands that run after login to macOS user session. | |
# 'start-at-login' needs to be 'true' for 'after-login-command' to work | |
# Available commands: https://nikitabobko.github.io/AeroSpace/commands | |
after-login-command = [] |
/* | |
For a laravel project | |
*/ | |
server { | |
# Log files for Debugging | |
access_log /var/log/nginx/laravel-access.log; #you can edit this | |
error_log /var/log/nginx/laravel-error.log; #you can edit this too | |
server { | |
listen 80; | |
listen [::]:80; | |
root /var/www/web-apps/website/public; | |
index index.php index.html index.htm index.nginx-debian.html; | |
server_name website.com www.website.com; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; |
// npm i axios | |
const axios = require('axios').default; | |
axios.interceptors.request.use( x => { | |
// to avoid overwriting if another interceptor | |
// already defined the same object (meta) | |
x.meta = x.meta || {} | |
x.meta.requestStartedAt = new Date().getTime(); | |
return x; |
const axios = require('axios').default | |
const API_BASE_URL = 'https://api.spacexdata.com/v3' | |
const API = axios.create({ | |
baseURL: API_BASE_URL | |
}) | |
/* | |
* setting interceptors to be able | |
* to know response time of the each request |
{ | |
"/9j/": "image/jpeg", | |
"iVBORw0KGg": "image/png", | |
"R0lGODdh": "image/gif", | |
"UklGR": "image/webp", | |
"Qk0": "image/bmp", | |
"AAAA": "image/x-icon" | |
} |
IF LINUX SERVER, CONFIGURE APACHE2/NGINX via APT COMMAND
LEMP INSTALLATION RESOURCE - https://www.howtoforge.com/tutorial/ubuntu-laravel-php-nginx/
RPM (RED HAT, FEDORA, CentOS), yum COMMAND
yum install php
<?php | |
// This can be found in the Symfony\Component\HttpFoundation\Response class | |
const HTTP_CONTINUE = 100; | |
const HTTP_SWITCHING_PROTOCOLS = 101; | |
const HTTP_PROCESSING = 102; // RFC2518 | |
const HTTP_OK = 200; | |
const HTTP_CREATED = 201; | |
const HTTP_ACCEPTED = 202; |