Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View tobimori's full-sized avatar

Tobias Möritz tobimori

View GitHub Profile
<?php
use tobimori\DreamForm\Fields\Field;
class HeadingField extends Field
{
public static function blueprint(): array
{
return [
'label' => 'Überschrift',
const fs = require("fs");
const file = fs.readFileSync(__dirname + "/keys.txt").toString();
const games = file.split("\n\n").map((game) => game.split("\n"));
const toObject = games.map((game) => {
const [name, year] = game[0].split(/ \((\d+)\)/gm);
return {
name,
year,
export const openRoute = (loc: { address: string; long: number; lat: number }) => {
trackEvent(['trackEvent', 'Shopstandorte', `Route geöffnet`, `Route zu ${loc.address}`])
if (/iPad|iPhone|iPod|Mac/.test(navigator.platform)) {
window.open(`http://maps.apple.com/?daddr=${encodeURIComponent(loc.address)}`)
} else if (/Android/.test(navigator.platform)) {
window.open(
`geo:${encodeURIComponent(loc.lat)},${encodeURIComponent(loc.long)}?q=${encodeURIComponent(
loc.address
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import { tsParticles } from 'tsparticles-engine'
import { loadFull } from 'tsparticles'
export const confetti = async () => {
await loadFull(tsParticles)
await tsParticles.load('egg', {
emitters: [
{
position: {
title:
de: Häufig gestellte Fragen
en: Frequently asked questions
icon: question
preview: fields
wysiwyg: true
tabs:
content:
label:
@tobimori
tobimori / _app.jsx
Created February 15, 2022 13:50
Ackee Analytics with Next.js
import { useEffect } from 'react'
import Router from 'next/router'
import * as ackeeTracker from 'ackee-tracker'
// global styles (css reset, fonts)
import 'assets/styles/global.css'
const PersonalApp = ({ Component, pageProps, router }) => {
useEffect(() => {
if (typeof window !== 'undefined') {
@tobimori
tobimori / LinkedIn im Stil von DIE LINKE.svg
Last active April 13, 2021 13:51
LinkedIn im Stil von DIE LINKE.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.