This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { browser } from '$app/environment'; | |
import { urls } from '@/config'; | |
import { createClient, queryStore } from '@urql/svelte'; | |
import { derived, readable } from 'svelte/store'; | |
/** | |
* Helper function to create an urql client in a server side only load function | |
* | |
* | |
* @param {import('@sveltejs/kit').Cookies} cookies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require("path"); | |
const fs = require("fs").promises; | |
/* | |
# Fitbit Activity in Obsidian | |
## What does it do? | |
Insert a list of your fitbit activities into an obsidian note. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/xenial64" | |
config.vm.provider "virtualbox" do |v| | |
v.memory = 3072 | |
v.cpus = 4 | |
end | |
config.vm.provision "shell", inline: <<-SHELL | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
import os | |
import re | |
from bpy_extras import io_utils | |
from zipfile import ZipFile | |
EXPORT_SINGLE = False # Only export the selected Collection and not seperate files | |
ENABLE_ZIP = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
# uses method described here: | |
# https://blender.stackexchange.com/questions/228646/how-to-bake-displacement-map-from-another-mesh-not-multires/228659#228659 | |
IMAGE_RES = 1024 | |
def err(msg): | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# This script should be called inside a docker container | |
# to backup the database. | |
# $ ./backup.sh [hourly|daily|weekly|monthly|yearly] | |
# The environment variables for pg_dumpall need to be set. | |
set -e | |
# First command line arg. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"> | |
<meta content="utf-8" http-equiv="encoding"> | |
<title>Stopwatch</title> | |
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@600&display=swap" rel="stylesheet"> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function queryObject(object, path) { | |
const parts = path.split('.'); | |
let objects = wrapArray(object); | |
while (parts.length > 0 && objects.length > 0) { | |
const prop = parts.shift(); | |
objects = objects | |
.flatMap((o) => wrapArray(o[prop])) | |
.filter((o) => o != null); | |
} | |
return objects; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC = gcc | |
OBJDIR = bin | |
exec = udp/server udp/client tcp/server tcp/client | |
.PHONY: all clean | |
all: $(OBJDIR) $(exec) | |
clean: | |
rm -r $(OBJDIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import datetime | |
import math | |
##TODO: Ändere die zeiten an denen du die mittelwerte berechnene willst | |
# Liste von allen zeiden von denen du das mittel willst | |
mittelZeiten = [{'hour': 13, 'min': 10}, | |
{'hour': 16, 'min': 30}] |
NewerOlder