Skip to content

Instantly share code, notes, and snippets.

View mboynes's full-sized avatar

Matthew Boynes mboynes

View GitHub Profile
diff --git a/resources/js/app.js b/resources/js/app.js
index 01b8468..8c93dcc 100644
--- a/resources/js/app.js
+++ b/resources/js/app.js
@@ -7,6 +7,10 @@
require('./bootstrap');
window.Vue = require('vue');
+window.Vue.prototype.authorize = function(handler) {
+ const { user } = window.App;
@mboynes
mboynes / class-product.php
Created December 14, 2021 20:40
Product demo model for Mantle with GraphQL fields
<?php
/**
* Product class file.
*
* @package App\Models
*/
namespace App\Models;
use Mantle\Contracts\Database\Registrable;
@mboynes
mboynes / fieldmanager-module-post-limits.js
Created March 1, 2022 16:06
Limit POST data on fieldmanager repeating groups
'use strict';
jQuery(function ($) {
var $form = $('form#post');
if ($form.length && $('.fm-modules-wrapper').length) {
$form.submit(function (e) {
var $modules = $('.fm-modules-wrapper .fm-modules:not(.fmjs-proto)');
if ($modules.length) {
// Remove all protos to start.
curl -v "https://publish.twitter.com/oembed?maxwidth=600&maxheight=750&url=https:%2F%2Fx.com%2FWordPress%2Fstatus%2F1819377181035745510&dnt=1&format=json"
* Host publish.twitter.com:443 was resolved.
* IPv6: (none)
* IPv4: 104.244.42.195, 104.244.42.131, 104.244.42.67, 104.244.42.3
* Trying 104.244.42.195:443...
* Connected to publish.twitter.com (104.244.42.195) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/cert.pem
* CApath: none
#!/bin/bash
# Simplified Malicious NPM Package Security Scanner
# Scans package-lock.json files for known malicious packages
set -e
# Color codes
RED='\033[0;31m'
GREEN='\033[0;32m'