This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Models; | |
use Illuminate\Database\Eloquent\Factories\HasFactory; | |
use Corcel\Model\Post as Corcel; | |
class Post extends Corcel | |
{ | |
use HasFactory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/****************************************************************************************************** | |
* Job Event Listeners | |
* https://github.com/laravel/framework/tree/10.x/src/Illuminate/Queue/Events | |
*/ | |
Event::listen(function (JobTimedOut $event) { | |
Log::warning("Job Timed Out: {$event->job->resolveName()}", [ | |
'job_uuid' => $event->job->uuid(), | |
'attempts' => $event->job->attempts(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zend_extension=xdebug.so | |
xdebug.mode=debug | |
xdebug.discover_client_host=1 | |
xdebug.client_port = 9003 | |
xdebug.max_nesting_level = 512 | |
xdebug.idekey=VSCODE | |
xdebug.client_host=10.0.2.2 | |
xdebug.start_with_request=yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: Deploy Production | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ master ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ----------------------------------------------------------------- | |
# .gitignore for WordPress | |
# Bare Minimum Git | |
# http://ironco.de/bare-minimum-git/ | |
# ver 20150227 | |
# | |
# This file is tailored for a WordPress project | |
# using the default directory structure | |
# | |
# This file specifies intentionally untracked files to ignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Manually create entries and send notifications with Gravity Forms | |
$form_id = 10; | |
// add entry | |
$entry = array( | |
"form_id" => $form_id, | |
"1" => "Entry for field ID 1", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Bowser from "bowser" | |
const bowser = Bowser.parse(window.navigator.userAgent) | |
document.addEventListener("DOMContentLoaded", function(){ | |
document.body.classList.add(`browser-${bowser.browser.name.toLowerCase()}`) | |
document.body.classList.add(`os-${bowser.os.name.toLowerCase()}`) | |
document.body.classList.add(`platform-${bowser.platform.type.toLowerCase()}`) | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dig +short myip.opendns.com @resolver1.opendns.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get all instances of a form on the post | |
const matches = document.querySelectorAll(".gform_wrapper form") | |
// we are using vue.js here with the slug of the current post in state | |
const slug = store.state.currentPost.slug | |
// loop through each form on the post | |
matches.forEach(function(match) { | |
// get the value of the id of the form | |
let gformID = match.getAttribute("id") | |
// get only the form number off the gravity form using regex | |
let isolatedID = /([1-9][0-9]*)/.exec(gformID) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function toggle(id) { | |
var e = document.getElementById(id); | |
if( e.style.display == 'block' || getComputedStyle(e, null).display == 'block') | |
e.style.display = 'none'; | |
else | |
e.style.display = 'block'; | |
} |
NewerOlder