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
| for /r %i in (*) do powershell -NoProfile -Command "Unblock-File -Path '%~fi'" |
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
| # Lista versões comuns do Office (16.0 = 2016/2019/365, 15.0 = 2013, 14.0 = 2010) | |
| $officeVersions = @("16.0", "15.0", "14.0") | |
| foreach ($version in $officeVersions) { | |
| $path = "HKCU:\Software\Microsoft\Office\$version\Excel\Security" | |
| if (Test-Path $path) { | |
| Write-Output "Aplicando configuração para Excel versão $version..." | |
| # Cria a chave se não existir |
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
| "1073741824" <!-- 1 GB --> | |
| <system.web> | |
| <httpRuntime maxRequestLength="2097151" executionTimeout="600" /> | |
| </system.web> | |
| <system.webServer> | |
| <security> | |
| <requestFiltering> |
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.IO; | |
| using System.ServiceModel; | |
| using System.Windows.Forms; | |
| namespace WcfFileUploadClient | |
| { | |
| public partial class Form1 : Form | |
| { | |
| public Form1() |
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
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css"> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/vbscript.min.js"></script> | |
| <script>hljs.highlightAll();</script> | |
| <pre><code class="language-vbscript"> | |
| Sub HelloWorld() | |
| MsgBox "Hello from VBA!" |
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
| <configuration> | |
| <system.web> | |
| <authorization> | |
| <allow users="*" /> | |
| </authorization> | |
| </system.web> | |
| <system.webServer> | |
| <security> | |
| <authentication> | |
| <anonymousAuthentication enabled="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
| static string ExtrairValorEntreParenteses(string input) | |
| { | |
| var match = Regex.Match(input, @"\(([^)]*)\)"); | |
| return match.Success ? match.Groups[1].Value : null; | |
| } |
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 EnviarComCertificadoCliente() | |
| Dim http As Object | |
| Dim url As String | |
| Dim certSubject As String | |
| Dim json As String | |
| url = "https://sua-api.com/endpoint" | |
| certSubject = "CN=Nome do seu certificado" |
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 Microsoft.AspNetCore.Authentication.Certificate; | |
| using Microsoft.AspNetCore.Server.Kestrel.Https; | |
| using System.Security.Claims; | |
| var builder = WebApplication.CreateBuilder(args); | |
| // Autenticação por certificado digital | |
| builder.Services.AddAuthentication(CertificateAuthenticationDefaults.AuthenticationScheme) | |
| .AddCertificate(options => | |
| { |
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
| // ----------------------------- | |
| // TokenInfo.cs | |
| // ----------------------------- | |
| public class TokenInfo | |
| { | |
| public string Token { get; init; } | |
| public string Username { get; init; } | |
| public string IpAddress { get; init; } | |
| public DateTime Expiration { get; init; } | |
| } |
NewerOlder