Skip to content

Instantly share code, notes, and snippets.

View tcortega's full-sized avatar

tarcisio tcortega

  • 13:34 (UTC +07:00)
View GitHub Profile
@tcortega
tcortega / 1-force-gas-form.png
Created September 12, 2026 08:28
revoloot PR 587 Force gas tracker evidence
1-force-gas-form.png
@tcortega
tcortega / dialog-01-leftover.png
Created September 11, 2026 15:54
PR 582 House Send dialog UI shots
dialog-01-leftover.png
@tcortega
tcortega / 00-empty-disabled-krak-145.jpg
Last active September 11, 2026 15:53
PR 582 House Send isolated proof shots
00-empty-disabled-krak-145.jpg
@tcortega
tcortega / http.go
Created March 5, 2024 06:42
manually create conn with an http proxy in go
func (p *Proxy) GetHttpImapConnection(imapServer string) (net.Conn, error) {
proxyAddr := p.IpAddress + ":" + strconv.Itoa(p.Port)
conn, err := net.Dial("tcp", proxyAddr)
if err != nil {
return nil, err
}
request := "CONNECT " + imapServer + " HTTP/1.1\r\nHost: " + imapServer + "\r\n"
if p.HasCredentials() {
credentials := p.GetEncodedCredentials()
%{
const symbols = {};
let currentScope = 0;
let nextScope = 1;
let lastType = null;
function enterScope() {
currentScope = nextScope;
nextScope++;
}
%{
const symbols = {};
let currentScope = 0;
let nextScope = 1;
let lastType = null;
function enterScope() {
currentScope = nextScope;
nextScope++;
}
var input = new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20, 21, 22, 23 };
var list = new List<int>(input);
foreach (var n in input)
{
var actualIndex = list.IndexOf(n);
var foundIndex = FindAt(input, n, 0, input.Length - 1);
Console.WriteLine($"[{n}] Expected: {actualIndex} | Found: {foundIndex}");
}
@tcortega
tcortega / CheckedOverflowChecks.cs
Last active October 31, 2023 01:07
TimeSpan overflow checks
public sealed class CheckedOverflowChecks : TimeSpanOverflowChecksContext
{
public static TimeSpan Interval(int days = 0, int hours = 0, long minutes = 0, long seconds = 0,
long milliseconds = 0, long microseconds = 0)
{
try
{
long ticks = checked((long)days * TicksPerDay
+ (long)hours * TicksPerDay
+ minutes * TicksPerMinute
[RegisterSingleton]
public class LabelEngine
{
private readonly ILogger _logger;
private readonly Timer _timer;
private readonly AsyncReaderWriterLock _lock = new();
private IBrowser _browser = null!;
private readonly string _browserPath;
public LabelEngine(ILogger logger, IOptions<LabelEngineOptions> options)
@tcortega
tcortega / cidades.json
Created September 18, 2023 16:28
Algumas cidades do ES, suas posições, vizinhos e distâncias
[
{
"nome": "Afonso Cláudio",
"latitude": -20.0778,
"longitude": -41.1261,
"vizinhos": [
{
"nome": "Itarana",
"distancia": 34.54
},