Skip to content

Instantly share code, notes, and snippets.

Alexander Zeitler AlexZeitler

Block or report user

Report or block AlexZeitler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AlexZeitler
AlexZeitler / setup-oh-my-zsh-powerlevel9k.sh
Created May 13, 2018
Installing zsh / oh-my-zsh / Powerlevel9k on Ubuntu 18.04
View setup-oh-my-zsh-powerlevel9k.sh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
mkdir ~/.local/share/fonts/
mv PowerlineSymbols.otf ~/.local/share/fonts/
fc-cache -vf ~/.local/share/fonts/
mkdir ~/.config/fontconfig/conf.d/
mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/
echo "Log out of your session and login again."
@AlexZeitler
AlexZeitler / siren_api.yml
Created Sep 20, 2019 — forked from kevinswiber/siren_api.yml
Siren definitions for Open API Specification
View siren_api.yml
swagger: '2.0'
info:
title: Siren API
description: Template for a Siren API
version: '0.1.0'
schemes:
- http
- https
basePath: /
produces:
@AlexZeitler
AlexZeitler / workflow.sh
Last active Sep 2, 2019
Run Atom / Visual Studio Code on Ubuntu via RDP
View workflow.sh
# Error before fixing:
# Xlib: extension "XInputExtension" missing on display ":10.0".
# Xlib: extension "XInputExtension" missing on display ":10.0".
#Find Atom / VS Code installation folder, e.g. /usr/share/atom or /usr/share/code
dpkg -L atom
dpgk -L visual-studio-code
#Find libxcb1 installation folder, e.g. /usr/lib/x86_64-linux-gnu/libxcb.so.1
dpkg -L libxcb1
@AlexZeitler
AlexZeitler / gist:2821442
Created May 28, 2012
Custom datetime formatting with JSON.NET and ASP.NET Web API
View gist:2821442
var config = GlobalConfiguration.Configuration;
var settings = new JsonSerializerSettings();
settings.Converters.Add(new IsoDateTimeConverter()
{
DateTimeFormat = "dd.MM.yyyy"
});
config.Formatters.Remove(config.Formatters.JsonFormatter);
config.Formatters.Add(new JsonNetFormatter(settings));
@AlexZeitler
AlexZeitler / 1_createRootCA.sh
Last active Mar 17, 2019
create selfsigned certificate with subject alternative name
View 1_createRootCA.sh
#!/usr/bin/env bash
mkdir ~/ssl/
openssl genrsa -des3 -out ~/ssl/rootCA.key 2048
openssl req -x509 -new -nodes -key ~/ssl/rootCA.key -sha256 -days 1024 -out ~/ssl/rootCA.pem
View nginx_to_iis.conf
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
View es6-abstract-class-example.js
'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.");
View Dockerfile
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 Jul 12, 2018 — forked from rochacbruno/ACCESS_ELASTIC.md
Docker-compose wait-to-start
View ACCESS_ELASTIC.md

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

@AlexZeitler
AlexZeitler / pipeline.gdsl
Created Jul 12, 2018 — forked from ggarcia24/pipeline.gdsl
GDSL supporting pipeline declarative
View pipeline.gdsl
//The global script scope
def ctx = context(scope: scriptScope())
//What things can be on the script scope
contributor(ctx) {
method(name: 'pipeline', type: 'Object', params: [body: Closure])
property(name: 'params', type: 'org.jenkinsci.plugins.workflow.cps.ParamsVariable')
property(name: 'env', type: 'org.jenkinsci.plugins.workflow.cps.EnvActionImpl.Binder')
property(name: 'currentBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder')
property(name: 'scm', type: 'org.jenkinsci.plugins.workflow.multibranch.SCMVar')
You can’t perform that action at this time.