Skip to content

Instantly share code, notes, and snippets.

View mattcdavis1's full-sized avatar

Matt Davis mattcdavis1

View GitHub Profile
<?php
namespace datacode\app\services\formie;
use ReflectionClass;
class Helper
{
public static function getFormField($formieField)
{
import { createApp } from 'vue'
import router from '~/js/bootstrap/router'
const app = createApp({})
app.component('app', require('~/vue/app/index.vue').default)
app.component('breadcrumbs', require('~/vue/app/_/breadcrumbs.vue').default)
app.use(router)
app.mount('#app')
import { createRouter, createWebHistory } from 'vue-router'
import Projects from '~/vue/app/projects/index'
import Dashboard from '~/vue/app/dashboard/index'
import ProjectDetail from '~/vue/app/projects/detail'
import ProjectCreate from '~/vue/app/projects/create'
const routes = [
{
path: '/',
redirect: '/projects',
@mattcdavis1
mattcdavis1 / GoogleDocsReplaceAllFail.php
Last active February 17, 2021 01:48
Google Docs Replace Fails
<?php
namespace App\Console\Commands\Google;
use Google_Client;
use Google_Http_Batch;
use Google_Service_Docs_BatchUpdateDocumentRequest;
use Google_Service_Docs_ReplaceAllTextRequest;
use Google_Service_Docs_SubstringMatchCriteria;
use Google_Service_Docs;
.alert {
border: 1px solid transparent;
border-radius: .25rem;
display: flex;
left: 0;
margin-bottom: 1rem;
padding: .75rem 1.25rem;
position: fixed;
position: relative;
right: 0;
@mattcdavis1
mattcdavis1 / adwordsPhoneReplacement.html
Last active January 28, 2018 00:45
Adwords Phone Replacement
<script type="text/javascript">
(function() {
var pageId = Date.now();
var trackedAdwords = false;
var tracker = {
track: function () {
if (trackedAdwords) {
return;
}
@mattcdavis1
mattcdavis1 / BaseAssetSourceType.php
Created September 7, 2017 21:48
Craft Transform Issue
<?php
/**
* Copy a transform for a file from source location to target location.
*
* @param AssetFileModel $file The assetFileModel that has the transform to copy.
* @param string $targetFolderPath The target folder path.
* @param AssetTransformIndexModel $source The source transform index data.
* @param AssetTransformIndexModel $target The destination transform index data.
*
* @return mixed
<?php
namespace TeamTNT\TNTSearch\Indexer;
use Exception;
use PDO;
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use TeamTNT\TNTSearch\Connectors\FileSystemConnector;
use TeamTNT\TNTSearch\Connectors\MySqlConnector;
@mattcdavis1
mattcdavis1 / standards.scss
Created May 24, 2017 18:49
Union Coding Standards - SASS
.MyModule {
// attributes (alphabetical)
background: blue;
// pseudo
&:before {
}
// tag children (alphabetical)
div {
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"