This file contains hidden or 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 | |
| // JWT structure | |
| // header.payload.signature | |
| // $header | |
| $header = [ | |
| 'alg' => 'HS256', // HMAC - SHA256 | |
| 'typ' => 'JWT' | |
| ]; |
This file contains hidden or 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 | |
| saque("0:0"); // retorna "jogador a" | |
| saque("3:2"); // retorna "jogador b" | |
| saque("21:20"); // retorna "jogador a" | |
| saque("21:22"); // retorna "jogador b" | |
| saque("123321:2321232"); // um teste aleatório com um número bem grande | |
| function saque(string $placar): void { | |
| $pontuacao = explode(':', $placar); |
This file contains hidden or 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 {Injectable} from '@angular/core'; | |
| import {DBModel} from "./db-model"; | |
| @Injectable() | |
| export class AlimentationModel extends DBModel { | |
| protected table = 'alimentations'; | |
| createAlimentations(): Promise<any> { | |
| return this.findByField('id', 1) |
This file contains hidden or 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 JwtToken from '../services/jwt-token'; | |
| axios.interceptors.response.use(response => { | |
| if (response.headers.authorization !== undefined) { | |
| let token = response.headers.authorization; | |
| token = token.split(' ')[1]; | |
| JwtToken.setToken(token); | |
| } |
This file contains hidden or 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 JwtToken from '../services/jwt-token' | |
| import store from '../store/store'; | |
| import config from '../config'; | |
| let logout = ()=>{ | |
| store.dispatch('clearAuth'); | |
| window.location.href = config.login_url; | |
| }; | |
| axios.interceptors.request.use( |
This file contains hidden or 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/bash | |
| # ---------------------- | |
| # KUDU Deployment Script | |
| # Version: {Version} | |
| # ---------------------- | |
| # Helpers | |
| # ------- |
This file contains hidden or 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
| cd D:\home\site\wwwroot | |
| composer install | |
| npm install | |
| php artisan migrate | |
| npm run prod | |
| touch teste_criou.txt |
This file contains hidden or 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/bash | |
| # ---------------------- | |
| # KUDU Deployment Script | |
| # Version: 0.2.2 | |
| # ---------------------- | |
| # Helpers | |
| # ------- |
This file contains hidden or 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
| [config] | |
| command = bash deploy.sh |
This file contains hidden or 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
| export PATH="/usr/local/opt/php@7.1/bin:$PATH" | |
| export PATH="/usr/local/opt/php@7.1/sbin:$PATH" | |
| export PATH="$PATH:$HOME/.composer/vendor/bin" | |
| export PS1="\[\033[38m\]\u\[\033[32m\] \w \[\033[31m\]\`git \\ | |
| branch 2>/dev/null | grep \"^\*\" | \\ | |
| sed -E \"s/\*\ (.*)/ \(\1\)/\"\`\[\033[37m\]$\[\033[00m\] " |
NewerOlder