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
alias difftool='git difftool' | |
alias mergetool='git mergetool' | |
alias cob='git checkout -b' | |
alias p='git pull' | |
alias co='git checkout' | |
alias st='git status -s' | |
alias cmm='git commit -m' | |
alias a='git add .' | |
alias cpe='git cherry-pick -e' | |
alias cpn='git cherry-pick -n' |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Authorization; | |
using Microsoft.AspNetCore.Mvc; | |
namespace JwtSample.Controllers | |
{ | |
[Route("api/[controller]")] |
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
using System; | |
using System.IdentityModel.Tokens.Jwt; | |
using System.Security.Claims; | |
using JwtSample.Models; | |
using Microsoft.AspNetCore.Authorization; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.IdentityModel.Tokens; | |
namespace JwtSample.Controllers |
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
{ | |
"SecurityKey": "nZ2ola35dGraIYGbNWXR+IO8TnVDeyOeyhMR6rSG7zSj79OP+OjhKkG7uLSk2yo0SKMg4l/Ga7BV0XPfgJv2GQ==", | |
"Issuer": "otaviolarrosa", | |
"Audience": "UserAuthenticated", | |
"Logging": { | |
"IncludeScopes": false, | |
"Debug": { | |
"LogLevel": { | |
"Default": "Warning" | |
} |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Authentication.JwtBearer; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Logging; |
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
{ | |
"sub": "1234567890", | |
"name": "John Doe", | |
"admin": true | |
} |
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
{ | |
"alg": "HS256", | |
"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
using System; | |
using System.Threading; | |
namespace Threads | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var work1 = new Work1(); |
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
Thread thread1 = new Thread(() => SeuMetodo()); |
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
public class Work2 | |
{ | |
public void DoWork() | |
{ | |
for (int i = 1; i < 1001; i++) | |
Console.WriteLine($"Thread 2 -> Iteração {i}"); | |
} | |
} |