Skip to content

Instantly share code, notes, and snippets.

View rilleralle's full-sized avatar

Ralf Strobel rilleralle

View GitHub Profile
@rilleralle
rilleralle / build-push-docker.sh
Created June 29, 2018 05:20
Shell script to build and push a Docker image to a private or Docker Hub repo
#!/bin/sh
# ============================================================================
# Usage
#
# build-push-docker.sh \
# --image-name=name \
# --dockerfile=Dockerfile \
# --private-repo-url=my-private-docker-registry.foo
# --private-repo-path=/path
@rilleralle
rilleralle / authProvider.js
Created May 30, 2019 19:27
Example for react-admin to authenticate with OAuth2 against GitLab as the Authorization Server
import { AUTH_LOGIN } from 'react-admin';
export default (type, params) => {
if (type === AUTH_LOGIN) {
const { username, password } = params;
const oAuthParams = {
grant_type: "password",
username,
password
}