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 { StateMachine, interpret, EventObject } from '@xstate/fsm' | |
import { ref, Ref, onBeforeMount } from '@vue/composition-api' | |
export default function useMachine<TContext, TEvent extends EventObject = EventObject> ( | |
stateMachine: StateMachine.Machine<TContext, TEvent, any>): { | |
current: Ref<StateMachine.State<TContext, TEvent, any>>, | |
send: StateMachine.Service<TContext, TEvent>['send'], | |
service: StateMachine.Service<TContext, TEvent>, | |
} { | |
const current = ref(stateMachine.initialState) as Ref<StateMachine.State<TContext, TEvent, any>> |
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
const decodeJwt = token => token.split('.').map((item,index) => index==2?item:JSON.parse(atob(item))); | |
const encodeJwt = segments => segments.map((item,index)=>index==2?item:btoa(JSON.stringify(item))).join('.'); |
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' | |
networks: | |
web: | |
external: true | |
bridge: | |
external: true | |
services: | |
traefik: |
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
#!/bin/sh | |
set -e | |
vendor/bin/phpunit | |
npm run prod | |
git add . | |
(git commit -m "Build frontend assets for deployment to production") || true | |
(git push) || 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 { StateMachine, interpret, EventObject } from '@xstate/fsm' | |
import { ref, Ref, onBeforeMount } from '@vue/composition-api' | |
export default function useMachine<TContext, TEvent extends EventObject = EventObject> ( | |
stateMachine: StateMachine.Machine<TContext, TEvent, any>): { | |
current: Ref<StateMachine.State<TContext, TEvent, any>>, | |
send: StateMachine.Service<TContext, TEvent>['send'], | |
service: StateMachine.Service<TContext, TEvent>, | |
} { | |
const current = ref(stateMachine.initialState) as Ref<StateMachine.State<TContext, TEvent, any>> |
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.3" | |
services: | |
################################################ | |
#### Traefik Proxy Setup ##### | |
############################################### | |
traefik: | |
image: traefik:v2.0 | |
restart: always |
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
Docker 23 + Traefik v2.9.10 and v1.7 + Let's Encrypt + Github Registry V2 ghcr.io + Updated on 12 April 2023 | |
Content: | |
- Ubuntu 22.04 | |
- Docker Engine 23.0.3 | |
- Docker Compose 2.17.2 | |
- Traefik v1.7.18 with dnsChallenge | |
- Traefik v2.9.9 with httpChallenge | |
-- | |
- Github Registry V2 ghcr.io |
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
#Reference: https://www.smarthomebeginner.com/traefik-reverse-proxy-tutorial-for-docker | |
#Requirement: nano .env -> Set environmental variables: ${$USERDIR}, ${PUID}, ${PGID}, ${TZ}, ${DOMAINNAME}, ${CLOUDFLARE_EMAIL}, ${CLOUDFLARE_API_KEY}, ${HTTP_USERNAME}, ${HTTP_PASSWORD}, ${PLEX_CLAIM} etc. as explained in the reference. | |
version: "3.7" | |
services: | |
######### FRONTENDS ########## | |
# Traefik Reverse Proxy | |
traefik: |
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\Http\Middleware; | |
use Closure; | |
class RequestBeautifier | |
{ | |
protected $except = [ | |
'password', |
NewerOlder