Skip to content

Instantly share code, notes, and snippets.

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

Otávio Larrosa otaviolarrosa

🏠
Working from home
View GitHub Profile
@otaviolarrosa
otaviolarrosa / .bash_profile
Created August 22, 2018 13:27
My Personal Git files - .bash_profile
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'
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]")]
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
{
"SecurityKey": "nZ2ola35dGraIYGbNWXR+IO8TnVDeyOeyhMR6rSG7zSj79OP+OjhKkG7uLSk2yo0SKMg4l/Ga7BV0XPfgJv2GQ==",
"Issuer": "otaviolarrosa",
"Audience": "UserAuthenticated",
"Logging": {
"IncludeScopes": false,
"Debug": {
"LogLevel": {
"Default": "Warning"
}
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;
{
"sub": "1234567890",
"name": "John Doe",
"admin": true
}
{
"alg": "HS256",
"typ": "JWT"
}
using System;
using System.Threading;
namespace Threads
{
class Program
{
static void Main(string[] args)
{
var work1 = new Work1();
Thread thread1 = new Thread(() => SeuMetodo());
public class Work2
{
public void DoWork()
{
for (int i = 1; i < 1001; i++)
Console.WriteLine($"Thread 2 -> Iteração {i}");
}
}