Skip to content

Instantly share code, notes, and snippets.

@diomededavid
diomededavid / twitter_schema.php
Created July 18, 2021 00:59
Twitter Schema Plugin
<?php
/*
Plugin Name: Twitter Schema
Plugin URI: https://digitalblender.co
Description: Twitter Schema
Author: Prahlad Yeri
Version: .1
Author URI: https://prahladyeri.com/blog
*/
@diomededavid
diomededavid / field.php
Created September 27, 2021 19:49 — forked from Xilonz/field.php
Sage 9 Carbon Field Blocks
<?php
namespace App;
use Carbon_Fields\Field;
use Carbon_Fields\Block;
Block::make( __( 'Gutenberg Block' ) )
->set_icon( 'format-chat')
->add_fields( array(
Field::make( 'rich_text', 'text', __( 'text', 'my-theme' ) )
Git commands Cheat Sheet
Initialize a new git repository:
git init
Set configuration values for your username and email:
git config --global user.name <your-name>
git config
--global user. email <your-email>
Clone a repository:
@diomededavid
diomededavid / dropdownMenu.ts
Last active December 24, 2022 23:13
Typescript array for dropdown navigation menu component in React.js and daisy UI
/*
To create a dropdown navigation menu component in React using TypeScript, you can start by defining an interface for the menu items that will be displayed in the dropdown. This interface might include properties such as the label for the menu item, the destination URL, and any subitems that should be displayed in a submenu within the dropdown.
Next, you can create a component that accepts an array of menu items as a prop and uses this array to render the dropdown menu. For example:
*/
import * as React from 'react';