Skip to content

Instantly share code, notes, and snippets.

View joshmoto's full-sized avatar

J O S H M O T O joshmoto

View GitHub Profile
@joshmoto
joshmoto / phptest2.json
Created July 22, 2023 00:43
php test 2
{
"success": true,
"lat": "52.370216",
"lng": "4.895168"
}
@joshmoto
joshmoto / Vite.lib.php
Last active July 15, 2023 23:39
Vite php class for Wordpress
<?php
/**
* @author J O S H M O T O <https://github.com/joshmoto>
*/
class Vite {
/**
* Flag to determine whether hot server is active.
* Calculated when Vite::initialise() is called.
@joshmoto
joshmoto / Vite.lib.php
Created July 14, 2023 20:39
Wordpress php Vite class for handling Vite.js
<?php
/**
* @author Josh Cranwell <josh.cranwell@gmail.com>
*/
class Vite {
/**
* Flag to determine whether hot server is active.
* Calculated when Vite::initialise() is called.
<?php
use JetBrains\PhpStorm\NoReturn;
/**
* @author Josh Cranwell <josh.cranwell@gmail.com>
* @copyright The Sweet People
* @version 1.0
* @link https://www.thesweetpeople.com/
* @since March 2023
<?php
use JetBrains\PhpStorm\NoReturn;
/**
* @author Josh Cranwell <josh.cranwell@gmail.com>
* @copyright The Sweet People
* @version 1.0
* @link https://www.thesweetpeople.com/
* @since 23 March 2023
/db
/plugins
/uploads
/logs
@joshmoto
joshmoto / input.scss
Created October 17, 2021 19:59
Generated by SassMeister.com.
@mixin respond($breakpoint:false) {
@if $breakpoint == 'phone' {
@media only screen and (max-width: 37.5em) {
@content
}
}
@else if $breakpoint == 'tab-port' {
@media only screen and (max-width: 56.25em) {
@joshmoto
joshmoto / input.scss
Created December 19, 2020 05:19
Generated by SassMeister.com.
@import url("https://fonts.googleapis.com/css2?family=Open:ital,wght@0,300;0,700;1,400&display=swap")
:root {
--color-grey-dark: #202326;
--color-green: #42b680;
--color-purple: #7288da;
}
* {
box-sizing: border-box;
@joshmoto
joshmoto / DynamicRouter.lib.php
Created November 19, 2020 21:33
Dynamic Router Class for Wordpress
<?php
/**
* @author joshmoto <https://stackoverflow.com/users/888894/joshmoto>
*/
class DynamicRouter {
protected static
/**
<div class="modal fade" id="ajaxModalPopup" tabindex="-1" aria-labelledby="ajaxModalPopupLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="ajaxModalPopupLabel">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">