Skip to content

Instantly share code, notes, and snippets.

View devsrealm's full-sized avatar
Hello 👋

Olayemi Faruq devsrealm

Hello 👋
View GitHub Profile
@devsrealm
devsrealm / TonicsRoutesBenchmark.php
Created June 27, 2023 23:41
TonicsRouter Benchmarks With FastRoute and Symfony - Game With BitBucket Routes
<?php
use Devsrealm\TonicsRouterSystem\Container\Container;
use Devsrealm\TonicsRouterSystem\Events\OnRequestProcess;
use Devsrealm\TonicsRouterSystem\Handler\Router;
use Devsrealm\TonicsRouterSystem\RequestInput;
use Devsrealm\TonicsRouterSystem\Resolver\RouteResolver;
use Devsrealm\TonicsRouterSystem\Response;
use Devsrealm\TonicsRouterSystem\Route;
use Devsrealm\TonicsRouterSystem\RouteNode;
@devsrealm
devsrealm / better-slug-php.php
Last active August 17, 2021 05:30
Super Simple Seo Friendly Slug In PHP
<?php
/**
* @param $string
* @param string $separator
* @return string
* @author DevsrealmGuy
*/
public function slug($string, string $separator = '-'): string
{
#
@devsrealm
devsrealm / genre-seeds.json
Created March 6, 2021 15:04 — forked from drumnation/genre-seeds.json
Spotify Genre Seeds Available
{
"genres": [
"acoustic",
"afrobeat",
"alt-rock",
"alternative",
"ambient",
"anime",
"black-metal",
"bluegrass",
<?php
add_action( 'template_redirect', 'woo_custom_redirect_after_purchase' );
function woo_custom_redirect_after_purchase() {
global $wp;
if ( is_checkout() && !empty( $wp->query_vars['order-received'] ) ) {
wp_redirect( 'http://localhost:8888/woocommerce/custom-thank-you/' );
exit;
}
}