Skip to content

Instantly share code, notes, and snippets.

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

Marcel MTRNord

🏠
Working from home
View GitHub Profile
@MTRNord
MTRNord / README.md
Last active March 29, 2024 19:14
LDTK to Tiled workadventure helper

Required conventions

  • Each entity requires a globally unique id for matching between the formats
  • the .tmj file MUST have the level name as a filename
  • The exported tmx format MUST be converted to tmj using tiled
  • Tile Properties are set by adding json data to a tile in your tileset
  • Make sure to change tilesets to 32px

Teleport/exit areas

{% assign sorted_events = (site.events | sort: 'event_date') %}
{% for event in sorted_events %}
{% unless event.event_section %}
{% if event.event_fulldate %}
<span style="font-weight: bold;">{{event.title}}</span> <br>
<span style="font-style: italic;">am {% include translated_date.html date=event.event_date format="%-d. %B %Y" lang="de" %}</span> <br>
{{event.content | remove: '<p>' | remove: '</p>'}}<br><br>
{% else %}
<span style="font-weight: bold;">{{event.title}}</span> <br>
<span style="font-style: italic;">am {% include translated_date.html date=event.event_date format="%-d. %B %Y, %H:%M Uhr" lang="de" %}</span> <br>
@MTRNord
MTRNord / opendata_sh.yml
Last active June 28, 2019 12:57
The openapi description of the ckan API used by opendata.schleswig-holstein.de
openapi: 3.0.1
info:
title: OpenData Schleswig-Holstein
description: The opendata portal of Schleswig-Holstein
termsOfService: >-
https://www.schleswig-holstein.de/DE/Schwerpunkte/openData/Infos/infos_node.html
contact:
email: opendata@lr.landsh.de
version: '3'
externalDocs:
declare module 'dialogflow-fulfillment' {
import { DialogflowConversation } from 'actions-on-google';
import { Request, Response } from 'express';
export class Card extends RichResponse {
constructor(card: string | object);
public setButton(button: {
text: string,
url: string,
@MTRNord
MTRNord / Riot CSP
Created September 18, 2018 18:49
Replace https://matrix.ffslfl.net with your own Matrix Server domain
default-src 'self' https://matrix.ffslfl.net;
script-src 'self' 'unsafe-inline' 'unsafe-eval';
style-src 'self' 'unsafe-inline';
img-src 'self' data: https://matrix.ffslfl.net blob:;
font-src 'self';
object-src 'self';
child-src 'self' https://scalar-staging.riot.im; frame-ancestors *;
upgrade-insecure-requests;
block-all-mixed-content;
referrer origin;
@MTRNord
MTRNord / Makefile
Last active August 18, 2018 07:39
Test Package for Golang Openwrt
include $(TOPDIR)/rules.mk
PKG_NAME:=hello_world
PKG_VERSION:=0.1.0
PKG_RELEASE:=1
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[
{
"title": "Test1",
"author": "Test1",
"url": "https://medium.com/react-ecosystem/how-to-handle-state-in-react-6f2d3cd73a0c"
}
]
@MTRNord
MTRNord / Lookup.md
Last active February 26, 2017 18:01

Requires plugin: lookup.sheetapi

NOTE: You need a Serviceaccount (explained below) and you need to share the sheet with it.

/bot lookup [<MAX] <keyword>

  • Need to enable in config: spreadsheet_enabled, spreadsheet_url and spreadsheet_credentials_file
  • spreadsheet_worksheet allows you to optionaly define the worksheet to use by name.
  • Will look up each row of a spreadsheet and if the keyword is found will return the whole row
  • if
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';