Skip to content

Instantly share code, notes, and snippets.

View johnzenith's full-sized avatar
🎯
...Building apps with JavaScript, TypeScript, Rust, Go, PHP

John Musa johnzenith

🎯
...Building apps with JavaScript, TypeScript, Rust, Go, PHP
View GitHub Profile
@johnzenith
johnzenith / nigerian-states.json
Created January 1, 2025 23:46 — forked from chrisidakwo/nigerian-states.json
All 36 states in Nigeria, and their local government areas - including the Federal Capital Territory and its area councils
{
"Abia": [
"Aba North",
"Aba South",
"Arochukwu",
"Bende",
"Ikwuano",
"Isiala-Ngwa North",
"Isiala-Ngwa South",
"Isuikwato",
https://dev.to/juliafmorgado/get-paid-to-write-technical-articles-16cl
https://www.honeybadger.io/blog/write-for-us/
import * as React from 'react';
import { styled } from '@mui/material/styles';
import Button from '@mui/material/Button';
import Tooltip, { tooltipClasses } from '@mui/material/Tooltip';
import Typography from '@mui/material/Typography';
const LightTooltip = styled(({ className, ...props }) => (
<Tooltip {...props} classes={{ popper: className }} />
))(({ theme }) => ({
[`& .${tooltipClasses.tooltip}`]: {
// Delete remote branch
git push origin --delete branch-name-to-delete
// Delete local branch
$ git branch -D <branch_name>

ReactJS Animation List

React Spring

React Gesture

<?php
$mail->isSMTP();
$mail->Host = 'example.com';
$mail->SMTPAuth = true;
$mail->Username = 'email';
$mail->Password = 'pass'
//$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; //Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged
$mail->Port = 587; // or use 26 [Note: 465 may not work]

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@johnzenith
johnzenith / functions.php
Created June 5, 2021 10:39 — forked from tripflex/functions.php
Programmatically create a WooCommerce Subscription and associated WooCommerce Order
<?php
public function give_user_subscription( $product, $user_id, $note = '' ){
// First make sure all required functions and classes exist
if( ! function_exists( 'wc_create_order' ) || ! function_exists( 'wcs_create_subscription' ) || ! class_exists( 'WC_Subscriptions_Product' ) ){
return false;
}
$order = wc_create_order( array( 'customer_id' => $user_id ) );
@echo off
set /p domain="Enter Domain: "
set OPENSSL_CONF=../conf/openssl.cnf
if not exist .\%domain% mkdir .\%domain%
..\bin\openssl req -config cert.conf -new -sha256 -newkey rsa:2048 -nodes -keyout %domain%\server.key -x509 -days 3650 -out %domain%\server.crt
echo.
echo -----