Skip to content

Instantly share code, notes, and snippets.

View puppy0cam's full-sized avatar
⚱️
Urned

puppy0cam puppy0cam

⚱️
Urned
View GitHub Profile
@puppy0cam
puppy0cam / ExampleUseCase.vue
Created February 15, 2023 03:57
Helpful function for Vue 3 that allows you to achieve asynchronous computed values without making the entire component async
<template>
<img v-if="url" :src="url" />
<img v-else src="./assets/placeholder.png" />
</template>
<script lang="ts">
import { defineComponent } from "vue";
import { createAsyncComponentComputedValue } from "./createAsyncComponentComputedValue.js";
export default defineComponent({
@puppy0cam
puppy0cam / GenerateUUID.cpp
Last active December 14, 2019 00:33
UUID v4 generator. The project was used to help me teach myself the basics of C++, and eventually I went heavily into trying to optimise it.
#pragma once
#include "GenerateUUID.h"
#ifndef UUID_CHARACTER_COUNT
#define UUID_CHARACTER_COUNT 36
#endif
#include "GenerateUUIDString.cpp"
#include <string>
// Generates a UUID v4 string.
@puppy0cam
puppy0cam / D3JS Tree Editor.md
Last active December 13, 2019 09:23 — forked from adamfeuer/ D3JS Tree Editor.md
d3js tree editor with node create, delete, and rename
We couldn’t find that file to show.