Skip to content

Instantly share code, notes, and snippets.

View wottpal's full-sized avatar

Dennis Zoma wottpal

View GitHub Profile
{
"name": "SEO Articles to Github Publish Workflow",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "e4e6a932-b0a7-4434-9fa9-ac63500743ac",
"authentication": "headerAuth",
"options": {}
},
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Merge Branch
on:
workflow_dispatch:
jobs:
merge:
name: Merge Branch
runs-on: ubuntu-latest
@wottpal
wottpal / date-formats.ts
Created April 18, 2019 15:10
Custom DateFormats & DateAdapter for Angular Material MatDatepicker using Day.js
import { Platform } from '@angular/cdk/platform';
import { NativeDateAdapter } from '@angular/material';
import * as dayjs from 'dayjs';
import 'dayjs/locale/de';
import * as customParseFormat from 'dayjs/plugin/customParseFormat';
import * as localizedFormat from 'dayjs/plugin/localizedFormat';
/**
* Custom Date-Formats and Adapter (using https://github.com/iamkun/dayjs)
@wottpal
wottpal / counter.component.ts
Last active March 25, 2020 17:36
Simple Angular Counter/Countdown Component with dayjs & rxjs
/**
*
* Example Usage:
*
* # Counter
* const now = dayjs()
* <app-counter [autostart]="true" [mode]="forwards" [startTime]="now"></app-counter>
*
* # Countdown
* const later = dayjs().add(1, 'minute')
@wottpal
wottpal / form.service.ts
Last active April 21, 2021 14:55
Angular Service to synchronize FormGroup(s) with LocalStorage (get & set)
import { Injectable } from '@angular/core';
import { FormGroup, FormControl } from '@angular/forms';
import * as dayjs from 'dayjs'
@Injectable({
providedIn: 'root'
})
export class FormService {
#! -*- coding: utf-8 -*-
import sys
import time
import numpy as np
import gensim
import matplotlib.pyplot as plt
from matplotlib import font_manager, rc
from sklearn.manifold import TSNE
from sklearn.cluster import MiniBatchKMeans
def VGG_16_BN(input_shape):
model = models.Sequential()
model.add(Convolution2D(64, (3,3), input_shape=input_shape, activation='relu', padding='same', use_bias=False))
model.add(BatchNormalization())
model.add(Convolution2D(64, (3,3), activation='relu', padding='same', use_bias=False))
model.add(BatchNormalization())
model.add(MaxPooling2D((2,2), strides=(2,2)))
model.add(Convolution2D(128, (3,3), activation='relu', padding='same', use_bias=False))
model.add(BatchNormalization())

Simple Contact-Form in Kirby 3

As a starting point I've used the latest Starterkit (Beta 4) combined with the core from the latest Nightly Build (18-08-06).

First, set email-properties in your config. I would recommend using a mail-service like Mailgun (via SMTP) because setting everything up on your own server is cumbersome, error-prone, and unsecure. But of course, it's up to you.

site/config/config.php:

<?php
@wottpal
wottpal / kirby-nginx
Last active November 15, 2018 19:20
#######################
#######################
# KIRBY-CONFIGURATION #
# block content
location ~ ^/content/(.*).(txt|md|mdown)$
{
rewrite ^/content/(.*).(txt|md|mdown)$ /error redirect;
}
@wottpal
wottpal / debug.js
Last active April 19, 2018 10:22
A convenience wrapper around the Console API which adds several functionalities.
/**
* A convenience wrapper around the Console API which adds:
* - Logging has to be globally enabled first (in a dev-environment)
* - Even when disabled logged messages are cached and can be displayed later
* - Prefix messages with a custom〈 Label 〉
*
* TODO Maybe add verbose-flag to really be able to log everything if needed
**/