Skip to content

Instantly share code, notes, and snippets.

View FrancisGregori's full-sized avatar

Francis Gregori Munis FrancisGregori

View GitHub Profile
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=changeme # <-- wordpress owner
WP_GROUP=changeme # <-- wordpress group
WP_ROOT=/home/changeme # <-- wordpress root directory
@FrancisGregori
FrancisGregori / settings.json
Created May 19, 2020 22:42
VSCode settings
{
"editor.tabSize": 2,
"editor.fontSize": 16,
"editor.lineHeight": 24,
"editor.rulers": [80, 120],
"editor.fontLigatures": true,
"editor.fontFamily": "Fira Code",
"editor.renderLineHighlight": "gutter",
"editor.parameterHints.enabled": false,
const withNextIntl = require('next-intl/plugin')();
const nextConfig = {};
module.exports = withNextIntl(nextConfig);
import { getRequestConfig } from 'next-intl/server';
export default getRequestConfig(async ({ locale }) => ({
messages: (await import(`./dictionaries/${locale}.json`)).default,
}));
import { createSharedPathnamesNavigation } from 'next-intl/navigation';
export const locales = ['en', 'es', 'pt'] as const;
export const { Link, redirect, usePathname, useRouter } =
createSharedPathnamesNavigation({ locales });
import createMiddleware from 'next-intl/middleware';
import { locales } from './navigation';
export default createMiddleware({
locales,
defaultLocale: 'en',
localePrefix: 'never',
localeDetection: false,
domains: [
import { ReactNode } from 'react';
import { Inter } from 'next/font/google';
import { notFound } from 'next/navigation';
import Providers from '@/app/providers';
import Navbar from '@/components/Navbar';
import { locales } from '@/navigation';
const inter = Inter({ subsets: ['latin'] });
import { ReactNode } from 'react';
import './globals.css';
export default function RootLayout({ children }: { children: ReactNode }) {
return children;
}
import React from 'react';
import Link from 'next/link';
import { getTranslations } from 'next-intl/server';
const Navbar = async ({ locale }: { locale: string }) => {
const t = await getTranslations({ locale, namespace: 'components.navbar' });
return (
<header className="w-full border-b border-gray-200 bg-white/75 p-4 py-4 shadow-md">
import React from 'react';
import Link from 'next/link';
import { useTranslations } from 'next-intl';
const Navbar = () => {
const t = useTranslations('components.navbar');
return (
<header className="w-full border-b border-gray-200 bg-white/75 p-4 py-4 shadow-md">