Skip to content

Instantly share code, notes, and snippets.

# 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 = []
@Samuel-Isirima
Samuel-Isirima / Nginx config for laravel and vanilla PHP or HTML projects
Last active February 28, 2024 16:23
Nginx sites available config for laravel and vanilla php projects
/*
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
@Samuel-Isirima
Samuel-Isirima / github-action-ssh.md
Created January 18, 2024 11:16 — forked from raviagheda/github-action-ssh.md
Github Action with EC2 using SSH
@Samuel-Isirima
Samuel-Isirima / gist:159c4ab4956be431d677793930113b89
Created December 4, 2023 13:51
Laravel Virtual Host Config For Nginx
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;
@Samuel-Isirima
Samuel-Isirima / api.js
Created November 25, 2023 07:58 — forked from gnurgeldiyev/api.js
How to get the response time from Axios
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
@Samuel-Isirima
Samuel-Isirima / base64_mime_type.json
Created October 21, 2023 21:02 — forked from Bryan-b/base64_mime_type.json
Mime type from base64 image
{
"/9j/": "image/jpeg",
"iVBORw0KGg": "image/png",
"R0lGODdh": "image/gif",
"UklGR": "image/webp",
"Qk0": "image/bmp",
"AAAA": "image/x-icon"
}
@Samuel-Isirima
Samuel-Isirima / laraws_nginx.md
Created October 14, 2023 05:21 — forked from ErxrilOwl/laraws_nginx.md
Deploy Laravel on AWS EC2 Ubuntu (nginx)
@Samuel-Isirima
Samuel-Isirima / Response.php
Created January 24, 2023 00:37 — forked from jeffochoa/Response.php
Laravel HTTP status code
<?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;