Skip to content

Instantly share code, notes, and snippets.

View davidshq's full-sized avatar

Dave Mackey davidshq

View GitHub Profile
@davidshq
davidshq / VtkViewer.vue
Last active April 30, 2023 21:56
VtkViewer.vue Props Problem
<script setup lang="ts">
import {
ref,
computed,
watch,
onMounted,
onBeforeUnmount,
defineProps,
} from 'vue';
import { vec3 } from 'gl-matrix';
@davidshq
davidshq / imeanwhat.md
Last active April 18, 2023 19:47
I mean, what?!?....

I'm working on merging two branches of an application. One is running Vue 2.7.x, the other Vue 2.6.x. I brought the dependencies in the older project up to those in Vue 2.7.x and tried running it and it cranks at me - it is still using Vue 2.6.x instead of Vue 2.7.x and so I see lots of:

ERROR in src/components/DataImportExport.vue:2:20 TS2614: Module '"vue"' has no exported member 'defineComponent'. Did you mean to use 'import defineComponent from "vue"' instead?
1 | <script lang="ts">
2 | import { computed, defineComponent, ref } from 'vue';
| ^^^^^^^^^^^^^^^
3 | import store from '@/store';
4 | import djangoRest from '@/django';
5 | import { Project } from '@/types';

@davidshq
davidshq / wp-plugin.json
Created June 7, 2021 14:13
Data Received from WordPress.org Plugin API
{
"name": "WooCommerce Payments",
"slug": "woocommerce-payments",
"version": "2.4.0",
"author": "<a href=\"https://woocommerce.com/\">Automattic</a>",
"author_profile": "https://profiles.wordpress.org/automattic",
"requires": "5.4",
"tested": "5.7.1",
"requires_php": "7.0",
"compatibility": [],
@davidshq
davidshq / Dataset-stripped.vue
Created May 28, 2021 19:44
Stripped Dataset.vue
<script>
export default {
name: "dataset",
// ...
data: () => ({
newNote: "",
// ...
reviewChanged: false,
// ...
editingNoteDialog: false,
@davidshq
davidshq / devkinstavvv.md
Last active April 24, 2021 15:37
DevKinsta VVV'ized
  • curl = already
  • software-properties-common = already
  • vim
    • sudo apt update
    • sudo apt install vim
  • xdebug
    • sudo apt install php-xdebug
    • sudo apt install php7.4-xdebug
    • Add additional xdebugs as needed for each PHP version.
  • nano
@davidshq
davidshq / SOLIDPodGettingStartedError.js
Created April 1, 2021 20:37
SOLID POD Getting Started Error Code
import {
getSolidDataset,
getThing,
setThing,
getStringNoLocale,
setStringNoLocale,
saveSolidDatasetAt
} from "@inrupt/solid-client";
import { Session } from "@inrupt/solid-client-authn-browser";
@davidshq
davidshq / indeed-api.md
Last active December 30, 2020 19:09
Some notes on the Indeed API

Dissecting an Indeed URL

Example: https://www.indeed.com/viewjob?cmp=Company-Name&t=?Job-Title&jk=job-key&sjdu=unknown&adid=Advertiser-ID&ad=unknown&pub=Publisher-ID&vjs=unknown

  • cmp = name of company, Example: "Meridian Investigative Group, Inc" Encoded: "Meridian-Investigative-Group%2C-Inc."
  • t = job title - Example: "Software Developer" - Encoded: "Software+Developer"
  • jk = job key - Example: "4c581771cd6db81"
  • sjdu = ?
  • tk = tracking key -
  • adid = Advertiser ID - "advertiser number to use when attributing an application conversion."(2) - Example: "362609977"
  • ad = Could not find any documentation on what this is.
  • pub = Publisher ID, that is the company publishing the job listing, which may not be the same as the company the job is with.(1)

In this article I'm going to walk you through the process of creating Wordpress plugins. First I'm going to talk about some of the basic concepts in Wordpress plugin development like the actions, hooks, and API's that make up Wordpress. Then we're going to build a plugin where we apply some of the concepts and best practices in developing Wordpress plugins.

Prerequisites

In order to fully benefit from this tutorial:

  • You should have a basic knowledge of PHP
  • A running instance of WordPress with access to PHP
  • Beginner knowledge of HTML, CSS, and JavaScript is helpful but not required

Keybase proof

I hereby claim:

  • I am davidshq on github.
  • I am davidshq (https://keybase.io/davidshq) on keybase.
  • I have a public key ASBdP3HKWZpcFxfMvIMF-HcQmlfUKdlZk3cAyK0_gG_Abwo

To claim this, I am signing this object:

@davidshq
davidshq / what-is-svelte.md
Created June 17, 2019 03:17 — forked from Rich-Harris/what-is-svelte.md
The truth about Svelte

I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.

But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.

Svelte is a language.

Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?

A few projects that have answered this question: