- Create your realm / client
- Inside client configuration go to "Mappers"
- Click on "Create"
- Name it "hasura"
- Choose Mapper Type "Script Mapper"
- Add following script to demonstrate how it works
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import logging | |
import sys | |
import textwrap | |
from llama_index import ( | |
GPTKeywordTableIndex, | |
SimpleDirectoryReader, | |
LLMPredictor, | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useCallback, useEffect, useState } from 'react'; | |
import { useSetRecoilState } from 'recoil'; | |
import { useKeycloak } from '@react-keycloak/web'; | |
import { commonNotification } from './common'; | |
/** | |
* Returns the auth info and some auth strategies. | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, useState } from 'react' | |
import PropTypes from 'prop-types' | |
import styled, { withTheme } from 'styled-components' | |
import { withSearch } from '@elastic/react-search-ui' | |
import _get from 'lodash/get' | |
import Slider from 'rc-slider' | |
import 'rc-slider/assets/index.css' | |
import { FacetContainer, FacetHeader } from './SearchFacet' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Passport; | |
use App\User; | |
use Lcobucci\JWT\Builder; | |
use Lcobucci\JWT\Signer\Key; | |
use League\OAuth2\Server\CryptKey; | |
use Lcobucci\JWT\Signer\Rsa\Sha256; | |
use Laravel\Passport\Bridge\AccessToken as BaseToken; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
================================================================================= | |
NextJS Link React component using next-link, next-router, muilink and TypeScript. | |
Updated to resolve the following browser warning regarding passing "ref" to the DOM: | |
> Warning: Failed prop type: Invalid prop `component` supplied to `ForwardRef(Link)`. | |
> Expected an element type that can hold a ref. Did you accidentally provide a plain function component instead? | |
> For more information see https://material-ui.com/r/caveat-with-refs-guide | |
Example usage with Material UI: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
traefik: | |
image: "traefik:v2.0" | |
container_name: "traefik" | |
command: | |
# Globals | |
- "--log.level=DEBUG" | |
- "--api=true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import styled from '@emotion/styled'; | |
import { css } from '@emotion/core'; | |
import { CSSTransition } from 'react-transition-group'; | |
const has = (key, obj) => Object.prototype.hasOwnProperty.call(obj, key); | |
const keyframes = [ | |
'appear', | |
'enter', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.1' | |
services: | |
reverse-proxy: | |
image: traefik # The official Traefik docker image | |
command: --api --docker # Enables the web UI and tells Traefik to listen to docker | |
ports: | |
- "80:80" # The HTTP port | |
- "8080:8080" # The Web UI (enabled by --api) | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events |
NewerOlder