Skip to content

Instantly share code, notes, and snippets.

View johnregan3's full-sized avatar

John Regan johnregan3

View GitHub Profile
@daronspence
daronspence / BaseTable.vue
Created August 24, 2022 19:47
A table component to act as the base for larger table features.
<script>
const BaseTable = {
props: {
fields: {
type: Array,
default: [],
validator(fields) {
return fields.find(field => field?.key === undefined || field?.label === undefined) === undefined
},
},
@Shelob9
Shelob9 / serve-side-block.js
Last active February 4, 2024 20:38
Example Gutenberg block with server-side rendering. Gutenberg edit() block creates interface. Gutenberg saves settings automatically, the PHP function passed as `render_callback` to `register_block_type` is used to create HTML for front-end rendering of block.
const { __ } = wp.i18n;
const { registerBlockType } = wp.blocks;
const el = wp.element.createElement;
registerBlockType( 'hiRoy/serverSide', {
title: __( 'Server Side Block', 'text-domain' ),
icon: 'networking',
category: 'common',
attributes: {
@chranderson
chranderson / nvmCommands.js
Last active April 25, 2024 07:16
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
diff --git a/Vagrantfile b/Vagrantfile
index ec02352..235e0b1 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -107,9 +107,9 @@ Vagrant.configure("2") do |config|
# plugin is installed.
if File.exists?(File.join(vagrant_dir,'database/data/mysql_upgrade_info')) then
if vagrant_version >= "1.3.0"
- config.vm.synced_folder "database/data/", "/var/lib/mysql", :mount_options => [ "dmode=777", "fmode=777" ]
+ config.vm.synced_folder "database/data/", "/var/lib/mysql-synced", :mount_options => [ "dmode=777", "fmode=777" ]