Skip to content

Instantly share code, notes, and snippets.

View dannysmc95's full-sized avatar
๐Ÿ‘‹
hello

DeathlyNocturnal dannysmc95

๐Ÿ‘‹
hello
View GitHub Profile
@dannysmc95
dannysmc95 / Dynamic.vue
Created September 28, 2023 11:18
Distributed Vue Example
<template>
<component :is="DynamicComponent" />
</template>
<script setup lang="ts">
import { defineAsyncComponent } from 'vue';
const props = defineProps<{
path: string,
}>();
@dannysmc95
dannysmc95 / Pong.vue
Created July 31, 2023 12:18
Basic Pong (Vue 3 & TS)
<template>
<div class="game">
<div class="stats">
<p class="points">P1: {{ points.p1 }} / P2: {{ points.p2 }}</p>
<p class="frames">Frames: {{ frames }} / {{ renderedFrames }}</p>
<p class="clear pull-right" @click="clear">Clear</p>
<p class="reset pull-right" @click="reset()">Reset</p>
</div>
<div v-if="!running" class="startscreen">
@dannysmc95
dannysmc95 / pure-downloaded-capacitor.js
Last active February 18, 2024 03:02
Download a file with pure Capacitor FileSystem and the Fetch API.
const downloadFile = async (uri, path, folder) => {
return new Promise(async (resolve, reject) => {
try {
const file_request = await fetch(uri, {
method: 'GET',
credentials: 'include',
mode: 'cors',
});
const file_blob = await file_request.blob();