Skip to content

Instantly share code, notes, and snippets.

View 34fame's full-sized avatar
👨‍💻

Troy Moreland 34fame

👨‍💻
View GitHub Profile
@34fame
34fame / FForm.vue
Created September 7, 2020 02:38
Form renderer for dynamic forms
<template>
<q-page padding>
<q-form class="q-gutter-md" @submit="mxFormSubmit(model)">
<f-field-render
v-for="field in fields"
:key="field.model"
:field="field"
:onInput="(value,field) => onInput(value,field)"
:model="model"
/>
@34fame
34fame / FField.vue
Last active October 13, 2020 00:55
Field renderer for dynamic forms
<script>
import moment from 'moment'
export default {
props: {
field: {
type: Object,
required: true,
},
model: {
@34fame
34fame / formSchema.js
Created September 7, 2020 02:26
Form schema definitions for dynamic forms
export const users = {
add: {
name: {},
birthdate: {},
gender: {},
},
update: {
name: {},
birthdate: {},
gender: {},
@34fame
34fame / fieldSchema.js
Created September 7, 2020 02:22
Field schema definitions for dynamic forms
/*
* <field-name>: {
* component: '<ui-component-name>',
* default: '', // Default value
* label: '<field-label>',
* model: '<model-field-name>',
* fieldOptions: {
* attrs: { // Native component attributes
* _type: 'password' // Prefix keyword with '_'
* },
@34fame
34fame / MyField.vue
Last active July 19, 2021 00:18
Dynamically Render Form Fields
<script>
export default {
name: 'MyFormField',
props: {
field: {
type: Object,
required: true,
},
input: {
@34fame
34fame / axios.js
Created September 4, 2020 00:01
Quasar Boot File for Axios
import Vue from 'vue'
import axios from 'axios'
const instance = axios.create({})
instance.defaults.baseURL = process.env.API_BASEURL
instance.defaults.headers.common['Accept'] = 'application/json'
instance.defaults.headers.common['X-RequesterId'] = 'unknown'
instance.defaults.headers.post['Content-Type'] = 'application/json'
instance.defaults.headers.patch['Content-Type'] = 'application/json'

Overview

With this process in place, checking code into the master branch in GitHub will then trigger actions to build and deploy any client or server project associated.

Prerequisites

  • GitHub repo is already in place
  • Local project is already pushed to GitHub
@34fame
34fame / git-cheat-sheet.md
Last active June 30, 2020 14:26
Git Cheat Sheet

Clone

Clone existing repository

git clone https://<user>:<password>@github.com/<username>/<repo>

Create

Create local repository

git init
@34fame
34fame / results.js
Last active June 30, 2020 00:02
After grouping recurring dates
let results = {
"07/01/2020": {
"9:00 PM": [
{ id: 0, descr: 'Take out the trash' },
{ id: 1, descr: 'Take out the recycle' }
]
},
"07/06/2020": {
"9:00 PM": [
{ id: 2, descr: 'Take out the trash' }
DTSTART;TZID=America/Chicago:20200628T180000
RRULE:FREQ=MONTHLY;INTERVAL=1;WKST=MO;BYDAY=WE;BYSETPOS=4