Skip to content

Instantly share code, notes, and snippets.

View aeadedoyin's full-sized avatar
🥑
Advocating

Adedoyin Akande aeadedoyin

🥑
Advocating
View GitHub Profile
@aeadedoyin
aeadedoyin / healthcheck.md
Created March 6, 2024 08:36
Health Check route /health in Strapi CMS

How to get a /health route in Strapi CMS

It can also be used for similar use cases of a route without any /api or /admin prefix

  1. Generate a plugin named healthcheck

    This will generate this folder src/plugins/healthcheck

    npm run strapi generate plugin
    
    Plugin name: healthcheck
(ock
[ock
.f uc k
@rse
@rsehol
@unt
[unt
< unt
<***s
<**t
@aeadedoyin
aeadedoyin / tail4nuxt2.sh
Last active March 4, 2023 18:29
This bash will help setup TailwindCSS on your Nuxt2 Project
#!/bin/bash
# This bash will help setup Tailwind on your Nuxt2 Project
# Created by: 🐼 UDB - aeadedoyin.com
# Install Tailwind CSS and its peer dependencies
yarn add -D tailwindcss postcss autoprefixer npx
# Add the Tailwind directives to your CSS
mkdir -p ./assets/css
echo "
@aeadedoyin
aeadedoyin / meta-utils.js
Created October 20, 2021 15:28
Quickly scaffold for meta block in html head tag of a page (VueJS or NuxtJS)
// Utils file can be found here https://gist.github.com/aeadedoyin/f9fb0817762bc49ad8a856cd0b16ca97
// Just download and keep in same folder as this.(i.e meta-utils.js)
import { withHttp } from './utils'
// This util makes it faster to implement meta:Open Graph, Twitter
// All these variable are overbidden if passed with meta param
const type = 'Website'
let url = process.env.SITE_URL // From env
const title = 'SiteTitle and Short Description Goes Here'
const siteName = 'SiteTitle or ShortName'
@aeadedoyin
aeadedoyin / link-utils.js
Last active October 20, 2021 15:25
Quickly scaffold for link block in html head tag of a page (VueJS or NuxtJS)
@aeadedoyin
aeadedoyin / locale.js
Created October 19, 2021 08:56
Localization Middleware Sample
export default ({ $axios, store, i18n, switchLocalePath }) => {
// For none IP use
// return true
// For IP specific use
return $axios
.$get('https://www.cloudflare.com/cdn-cgi/trace')
.then((response) => {
const country = response
.trim()
@aeadedoyin
aeadedoyin / .eslintrc.js
Last active June 2, 2022 17:45
A fluent .eslint for your Vue(Nuxt) project without all the mess.
module.exports = {
root: true,
env: {
browser: true,
node: true
},
extends: [
'@nuxtjs',
'plugin:nuxt/recommended',
'eslint:recommended' // <- add this line
@aeadedoyin
aeadedoyin / utils.js
Last active October 17, 2021 09:31
Cool Utils/Boilerplate for your JS(Vue) Projects
import jqueryLib from 'jquery'
import momentLib from 'moment'
// Extended JSON Parse
export const JSONParse = (str, defaultVal = []) => {
try {
if (str != null) {
return JSON.parse(str)
} else {
return defaultVal
@aeadedoyin
aeadedoyin / Cool VSCode Settings
Created August 26, 2019 09:12
Cool VSCode Settings
{
"php.validate.executablePath": "C:\\xampp\\php\\php.exe",
"php.executablePath": "C:\\xampp\\php\\php.exe",
"php-cs-fixer.executablePath": "php-cs-fixer-v2.phar",
"php-cs-fixer.executablePathWindows": "php-cs-fixer-v2.phar",
"php-cs-fixer.rules": "@PSR2",
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
"workbench.activityBar.visible": true,
"php.suggest.basic": false,
"workbench.statusBar.visible": true,
@aeadedoyin
aeadedoyin / NigeriaFlag.html
Created August 12, 2019 18:25
With Tailwind by AEAdedoyin
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>With Tailwind by AEAdedoyin</title>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
</head>
<body>