Skip to content

Instantly share code, notes, and snippets.

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

Ibon ibonkonesa

🏠
Working from home
View GitHub Profile
@ibonkonesa
ibonkonesa / create_registry_user.sh
Created May 2, 2020 01:00
Create docker private registry ui and repository users
#!/bin/bash
username=$1;
password=$2;
#CREATE USER IN REGISTRY
docker run --rm -it -v $(pwd):/data httpd htpasswd -Bb /data/registrypasswords $username $password
#CREATE USER IN CATALOG
docker run --rm -it -v $(pwd):/data httpd htpasswd -b /data/auth $username $password
#UPDATE REGISTRY USERS
pass=`cat registrypasswords| base64 -w 0`
sed "s/^\(\s*htpasswd\s*:\s*\).*/\1 ${pass}/" secret.yaml > deploy.yaml
import React from 'react';
import { AuthCheck, useUser, useFirestore, useFirestoreCollection} from 'reactfire';
import { Heading } from '@chakra-ui/core';
import { Container, MainLayout, NeedSignInAlert } from '../../components';
const MyRequests = () => {
const user = useUser();
const requestsRef = useFirestore().collection('material-requests').where('userId', '==',user.uid);
const requests = useFirestoreCollection(requestsRef);