Skip to content

Instantly share code, notes, and snippets.

View AlexZeitler's full-sized avatar
👷‍♂️
Building stuff

Alexander Zeitler AlexZeitler

👷‍♂️
Building stuff
View GitHub Profile
@AlexZeitler
AlexZeitler / check if required tool can be executed
Last active October 3, 2020 13:06
check_required_software.sh
function check_required_software() {
ERROR=""
! [ -x "$(command -v curl)" ] && ERROR="$ERROR- curl\n"
! [ -x "$(command -v jq)" ] && ERROR="$ERROR- jq\n"
if [ -n "$ERROR" ]; then
echo "Some software is missing to run this script."
echo "Please make sure that you've installed:"
echo $ERROR >&2
type Person = {
firstName: string
lastName: string
middleName?: string
}
const hasValue = (value: Record<string, any>, property: any): boolean =>
Boolean(value[property])
type ValueOf<T> = T[keyof T]
@AlexZeitler
AlexZeitler / App.fs
Created June 12, 2020 12:43 — forked from aspnetde/App.fs
Feliz – MVU with React Function Components
module App
open Elmish
type State =
{ CurrentUser: string option }
type Msg =
| SignIn of string
| SignOut

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@AlexZeitler
AlexZeitler / keybase.md
Created December 11, 2019 15:08
keybase.md

Keybase proof

I hereby claim:

  • I am alexzeitler on github.
  • I am alexzeitler (https://keybase.io/alexzeitler) on keybase.
  • I have a public key ASB0qww7uSPAMkQCwMlF3wDCa-RQCliGbSSl4H7W1nx9yAo

To claim this, I am signing this object:

@AlexZeitler
AlexZeitler / siren_api.yml
Created September 20, 2019 19:19 — forked from kevinswiber/siren_api.yml
Siren definitions for Open API Specification
swagger: '2.0'
info:
title: Siren API
description: Template for a Siren API
version: '0.1.0'
schemes:
- http
- https
basePath: /
produces:
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
'use strict';
class Abstract {
// A static abstract method.
static foo() {
if (this === Abstract) {
// Error Type 2. Abstract methods can not be called directly.
throw new TypeError("Can not call static abstract method foo.");
} else if (this.foo === Abstract.foo) {
// Error Type 3. The child has not implemented this method.
throw new TypeError("Please implement static abstract method foo.");
FROM fluent/fluentd:v0.12.34
USER root
COPY ./etc/* /fluentd/etc/
COPY config.sh /fluentd/
RUN apk add --update --virtual .build-deps \
sudo build-base ruby-dev \
@AlexZeitler
AlexZeitler / ACCESS_ELASTIC.md
Created July 12, 2018 13:59 — forked from rochacbruno/ACCESS_ELASTIC.md
Docker-compose wait-to-start

When unsing docker compose you can have a problem with the order of dependent linked containers

The solution is to start a script which tries to access a service and waits until it gets ready before loading your program