Skip to content

Instantly share code, notes, and snippets.

View tobimori's full-sized avatar

Tobias Möritz tobimori

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,
<?php
use tobimori\DreamForm\Fields\Field;
class HeadingField extends Field
{
public static function blueprint(): array
{
return [
'label' => 'Überschrift',