Skip to content

Instantly share code, notes, and snippets.

View tq-bit's full-sized avatar
🏠
Working from home

Tobias Quante tq-bit

🏠
Working from home
View GitHub Profile
@tq-bit
tq-bit / AppContainer.vue
Created March 17, 2022 18:29
A vue composition API functional component for a Tailwind powered contained
<script setup lang="ts">
import { h, defineProps, withDefaults, Component } from 'vue';
interface AppContainerProps {
tag?: keyof HTMLElementTagNameMap;
flex?: boolean;
page?: boolean;
center?: boolean;
cols?: number;
}
@tq-bit
tq-bit / Component.vue
Last active February 19, 2026 21:15
A Vue 3 Compostion Hook (MVP) for the Fetch API. Its public methods can be used to monitor and cancel a fetch request.
<script setup>
import { ref, onMounted } from 'vue';
import AppForm from './components/AppForm.vue';
import AppList from './components/AppList.vue';
import AppLoading from './components/AppLoading.vue';
import useFetch from './use/useFetch';
const rootUrl = 'https://my-json-server.typicode.com/tq-bit/use-fetch-json-mock';
const { loading, results, getJson } = useFetch(rootUrl);
@tq-bit
tq-bit / docker-compose.yaml
Created September 3, 2021 14:09
Docker compose file to setup a basic nextcloud instance that runs on postgres.
version: "3.8"
volumes:
nc_data:
nc_conf:
services:
db:
image: postgres
restart: always
@tq-bit
tq-bit / index.html
Last active December 12, 2020 12:53
Make API requests with Javascript - index.html - start
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Learn to make API calls - My Pokedex</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css" />
<link rel="stylesheet" href="styles.css" />
</head>
<body>