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 / gist:bebdc6a5080ea2859c890465580d8379
Last active April 19, 2024 14:40
nanny-bot-prompt.txt

Character

You are a friendly, elderly caretaker for new and expectant parents. Your name is 'Nanny Margrat'. Your care starts with the mother's pregnancy and ends when the child turns six months old. You have a motherly, understanding, and caring voice when answering questions. When this is the user's first question, start your response with encouraging and personal words towards the parent.

Skills

Skill 1: Pregnancy Advice

  • Offer advice on common pregnancy symptoms.
  • Help the mother find a doctor for pregnancy-related consultations.
  • Advise on pregnancy-safe food & lifestyle choices, including legal aspects. When asked for either of these, always search for at least one source of information on the internet.
  • Assist parents in dealing with mental health issues and changes in relationships during pregnancy. When advising on questions like this, always search for at least one source of information on the internet.
  • Clarify and explain physical body changes during pregnancy.
@tq-bit
tq-bit / prompt.txt
Created October 31, 2023 15:08
GPT3.5 prompt for an Azure Tutor
I want you to act as my private tutor to learn Microsoft Azure. I am preparing for an exam with the title 'Azure Administrator Associate'. Its exam covers the following topics, separated from following content by three single quotes:
'''
As a candidate for this certification, you should have subject matter expertise in implementing, managing, and monitoring an organization’s Microsoft Azure environment, including:
- Virtual networks
- Storage
- Compute
- Identity
- Security
- Governance
@tq-bit
tq-bit / a_setup_nginx.sh
Last active April 28, 2023 08:44
Nginx Configuration with SSL, HTTP2, Load Balancing, Caching, Security headers, disabled caching, Gzip
#!/bin/bash
# Add your server's username & domain here
USER_NAME=tqbit
SERVER_DOMAIN=test.q-bit.me
SERVER_FRONTEND_PATH=/var/www/html # static, don't change
SERVER_API_PATH=/api # Adjust to your backend's API path
SERVER_API_CACHE_NAME=api_cache # Adjust to your cache key
SERVER_API_CACHE_PATH=/var/tmp/nginx # Change if you have a specific place for your cache
version: "2.1"
services:
calibre:
image: lscr.io/linuxserver/calibre:latest
container_name: calibre
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
- PASSWORD= #optional
version: "3.5"
services:
reverse-proxy:
# The official v2 Traefik docker image
image: traefik:v2.9
# Enables the web UI and tells Traefik to listen to docker
command: --providers.docker
ports:
# The HTTP port
npm create vite@latest .
npm install
npm i -D eslint prettier @vue/eslint-config-typescript @rushstack/eslint-patch eslint-config-prettier eslint-plugin-prettier
echo """{
\"bracketSpacing\": true,
\"semi\": true,
\"singleQuote\": true,
\"trailingComma\": \"all\",
\"printWidth\": 80,
@tq-bit
tq-bit / AppAudioPlayer.vue
Last active April 13, 2022 13:18
Empty boilerplate for an audio player Vue component
<script setup lang="ts">
import { onMounted, ref, computed } from 'vue';
import iPlay from './icons/iPlay.vue';
import iPause from './icons/iPause.vue';
const DEFAULT_AUDIO_ADDRESS = 'https://www.americanrhetoric.com/mp3clips/politicalspeeches/gettysburgaddressjohnnycash.mp3';
const currentAudioFileSource = null;
const previousAudioFileSource = null;
@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 November 22, 2023 11:54
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