Skip to content

Instantly share code, notes, and snippets.

View djaxho's full-sized avatar

Danny Jackson djaxho

View GitHub Profile
@djaxho
djaxho / PaymentRequestModal.vue
Created August 25, 2023 12:38
PaymentRequestModal.vue
<template>
<WdsButton @click="isOpen = true">open</WdsButton>
<WdsModal custom-size="866px" :show="isOpen" @cancel="isOpen = !isOpen" no-close-icon class="">
<div>
<WdsButtonGhost secondary @click="isOpen = false">
<WdsIcon :size="16" :name="WdsIconNameEnum.UNDO" />
&nbsp; Cancel
</WdsButtonGhost>
<div class="tw-mt-4">
<WdsHeading as="h1" type="display">Payment request</WdsHeading>
import { defineStore } from 'pinia'
import { computed, ref } from 'vue'
import moment from 'moment/moment'
import { TimesheetType } from '@/components/PaymentRequest/TimesheetType'
import { PaymentRequestType } from '@/components/PaymentRequest/PaymentRequestType'
import { required, requiredUnless, requiredIf, helpers } from '@vuelidate/validators'
import { useVuelidate } from '@vuelidate/core'
export const usePaymentRequestStore = defineStore('payment-request', () => {
const paymentRequestType = ref(PaymentRequestType.TIME_X_RATE)
@djaxho
djaxho / from-kebab-ToPascalCase.sh
Last active June 16, 2021 13:12
Convert files from kebab case to PascalCase
#!/bin/bash
## just running on .vue files
for file in **/*.vue; do
path=$(dirname "$file")
filename=$(basename "$file" | awk -F - '{printf "%s", $1; for(i=2; i<=NF; i++) printf "%s", toupper(substr($i,1,1)) substr($i,2); print"";}' | awk '{$1=toupper(substr($1,0,1))substr($1,2)}1')
mv "$file" "$path/$filename"
done
@djaxho
djaxho / docker-compose.yml
Created January 7, 2021 12:52 — forked from seanhandley/docker-compose.yml
How To Set Up Docker For Mac (Mojave) with Native NFS
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
@djaxho
djaxho / serve
Last active February 25, 2018 01:16
Quick way to serve laravel projects from within your www directory - run from anywhere - launches chrome
#!/bin/bash
#check if directory provided
if (( $# == 1 ))
then
google-chrome http://localhost:8080 && php -S localhost -t $1
exit
fi
# choose folder
printf "Please select folder:\n"