This file contains 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
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() |
This file contains 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
%{ | |
const symbols = {}; | |
let currentScope = 0; | |
let nextScope = 1; | |
let lastType = null; | |
function enterScope() { | |
currentScope = nextScope; | |
nextScope++; | |
} |
This file contains 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
%{ | |
const symbols = {}; | |
let currentScope = 0; | |
let nextScope = 1; | |
let lastType = null; | |
function enterScope() { | |
currentScope = nextScope; | |
nextScope++; | |
} |
This file contains 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
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}"); | |
} |
This file contains 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 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 |
This file contains 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
[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) |
This file contains 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
[ | |
{ | |
"nome": "Afonso Cláudio", | |
"latitude": -20.0778, | |
"longitude": -41.1261, | |
"vizinhos": [ | |
{ | |
"nome": "Itarana", | |
"distancia": 34.54 | |
}, |
This file contains 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
// ==UserScript== | |
// @name CSSBuy Fixes | |
// @namespace https://tcortega.com/ | |
// @version 0.1 | |
// @description Melhora o carregamento de imagens do CSSBuy | |
// @author tcortega | |
// @match https://www.cssbuy.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=cssbuy.com | |
// @grant none | |
// ==/UserScript== |
This file contains 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
// ==UserScript== | |
// @name Geoguessr AIO Cheat | |
// @namespace https://github.com/tcortega | |
// @version 1.0.1 | |
// @description Press SHIFT + ALT + G and the location of your current geoguessr game will open in a new tab | |
// @author tcortega | |
// @homepage https://github.com/tcortega | |
// @downloadURL https://gist.github.com/tcortega/7378d20dcfa7d15df780032ca2b78b3d/raw/geoguessr-aio.user.js | |
// @updateURL https://gist.github.com/tcortega/7378d20dcfa7d15df780032ca2b78b3d/raw/geoguessr-aio.user.js | |
// @match http*://*/* |