Skip to content

Instantly share code, notes, and snippets.

View dhanar98's full-sized avatar
🎯
Focusing

Dhanasekaran Ravichandran dhanar98

🎯
Focusing
View GitHub Profile
@dhanar98
dhanar98 / HomeSeo.js
Last active November 28, 2021 17:34
Next-Seo Default Snippet
import { NextSeo } from 'next-seo';
const HomeSeo = () => (
<>
<NextSeo
title="title"
description="Description about pages."
canonical="https://dhanar98.hashnode.dev/"
openGraph={{
url: 'https://dhanar98.hashnode.dev/',
@dhanar98
dhanar98 / Breadcrumbs.js
Created November 28, 2021 17:25
Breadcrumbs Snippet
import { BreadcrumbJsonLd } from 'next-seo';
const BreadCrumbs = () => (
<>
<BreadcrumbJsonLd
itemListElements={[
{
position: 1,
name: 'Home',
item: 'https://dhanar98.hashnode.dev/',
@dhanar98
dhanar98 / Article.js
Created November 28, 2021 18:12
Blog Snippet
import { ArticleJsonLd } from 'next-seo';
const Article = () => (
<>
<ArticleJsonLd
url="https://dhanar98.hashnode.dev/how-to-add-bootstrap-icons-in-next-js"
title="How to add bootstrap icons in next js"
images='https://example.com/photos/1x1/photo.jpg',
datePublished="2021-02-05T08:00:00+08:00"
dateModified="2021-02-05T09:00:00+08:00"
@dhanar98
dhanar98 / Faq.js
Created November 28, 2021 18:17
FAQ Page In Next-Seo
import { FAQPageJsonLd } from 'next-seo';
const Faq = () => (
<>
<FAQPageJsonLd
mainEntity={[
{
questionName: 'What is Next-Seo',
acceptedAnswerText: 'Next-Seo is an NPM package or Plugin to manage all your SEO related features in Next.js App.',
},
@dhanar98
dhanar98 / SitelinksSearchbox.js
Created November 28, 2021 18:26
Sitelinks Searchbox in Next-seo
import { SiteLinksSearchBoxJsonLd } from 'next-seo';
const SiteLinksSearchBox = () => (
<>
<SiteLinksSearchBoxJsonLd
url="https://dhanar98.hashnode.dev/"
potentialActions={[
{
target: 'https://dhanar98.hashnode.dev/search?q',
queryInput: 'search_term_string',
@dhanar98
dhanar98 / apache-server-commands.md
Created December 5, 2021 17:33
Managing Apache Server Commands

To start the Apache server: sudo systemctl start apache2

To stop the Apache server: sudo systemctl stop apache2

To stop and then start Apache sudo systemctl restart apache2

To reload apache server to update the new configurations

@dhanar98
dhanar98 / nginx-server-management-commands.md
Created December 11, 2021 16:55
Nginx Server basic commands

To Start the Nginx Server

sudo systemctl start nginx

To Stop the Nginx Server

sudo systemctl stop nginx

To Restart the Nginx Server

@dhanar98
dhanar98 / phalcon.conf
Last active December 11, 2021 17:24
Phalcon Configuration for Nginx Server
server {
listen 80;
server_name localhost;
root /var/www/phalcon/public; #root_path
index index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?_url=$uri&$args;
}
@dhanar98
dhanar98 / sitemap-fix.php
Created September 22, 2023 07:51
WordPress Sitemap Error - Error on line 2 at column 6: XML declaration allowed [FIXED]
<?php
function ___wejns_wp_sitemap_fix($arg) {
$allowed = false;
$found = false;
foreach (headers_list() as $header) {
if (preg_match("/^content-type:\\s+(text\\/|application\\/((xhtml|atom|rss)\\+xml|xml))/i", $header)) {
$allowed = true;
}
if (preg_match("/^content-type:\\s+/i", $header)) {
@dhanar98
dhanar98 / create-laravel-project.sh
Last active November 2, 2023 13:33
Building Your First Laravel Application using Bash Script Just giving Name - Database Support in MYSQL , Need Install Breeze Just giving Yes
#!/bin/bash
# Step 1: Install Composer if not already installed
if ! [ -x "$(command -v composer)" ]; then
echo "Composer is not installed. Installing..."
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php --install-dir=/usr/local/bin --filename=composer
php -r "unlink('composer-setup.php');"
fi