Skip to content

Instantly share code, notes, and snippets.

View mxkaske's full-sized avatar
🏠
Working from home

Maximilian Kaske mxkaske

🏠
Working from home
View GitHub Profile
@mxkaske
mxkaske / twitter.js
Created December 23, 2020 22:25 — forked from kmagiera/twitter.js
import React, { Component } from 'react'
import { View, Image, StyleSheet, ScrollView, Text, Animated, StatusBar } from 'react-native'
import Icon from 'react-native-vector-icons/MaterialIcons'
const IMG_SRC = { uri: "https://pulsations.files.wordpress.com/2010/05/randomdog.jpg" }
const IMG_HEIGHT = 200
const NAVBAR_HEIGHT = 64
class Twitter extends Component {
constructor(props) {
name: CD
# Only trigger, when the ci workflow succeeded
# The `workflow_run` will only trigger a workflow run if the workflow file is on the default branch
# See: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run
on:
push:
branches:
- main
workflow_dispatch:
@mxkaske
mxkaske / LabelDropdownMenu.tsx
Last active May 4, 2023 19:23
DropdownMenu with CheckboxItems and nested Dialog
"use client";
import * as React from "react";
import { Button } from "@/components/ui/button";
import {
DropdownMenu,
DropdownMenuCheckboxItem,
DropdownMenuContent,
DropdownMenuTrigger,
@mxkaske
mxkaske / [[...slug]].ts
Created June 15, 2023 18:26
Create a reduced REST API with Upstash and Nextjs App Router and optional catch-all segments
// /app/api/upstash/[[...slug]].ts
import { Redis } from "@upstash/redis";
const redis = Redis.fromEnv();
type Params = { slug: string | string[] | undefined };
function createKey(slug: Params["slug"]) {
return slug ? [...(Array.isArray(slug) ? slug : [slug])].join(":") : "_root";
}