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
#converts string to MD5 hash in hyphenated and uppercase format | |
$someString = "test" | |
$md5 = new-object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider | |
$utf8 = new-object -TypeName System.Text.UTF8Encoding | |
$hash = [System.BitConverter]::ToString($md5.ComputeHash($utf8.GetBytes($someString))) | |
#to remove hyphens and downcase letters add: | |
$hash = $hash.ToLower() -replace '-', '' |
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
# (c) 2018 Marcelo Novaes | |
# License - MIT | |
# Enable AptX and AAC codecs on bluetooth connections on macOS | |
sudo defaults write bluetoothaudiod "Enable AptX codec" -bool true | |
sudo defaults write bluetoothaudiod "Enable AAC code" -bool true | |
# Reads set values, should return something like: | |
# { |
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
using System; | |
using System.Threading; | |
using System.Threading.Channels; | |
using System.Threading.Tasks; | |
using Telegram.Bot; | |
using Telegram.Bot.Types; | |
namespace ChannelPolling | |
{ | |
internal static class Program |
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
// https://twitter.com/EgorBo/status/1565328134043344896 | |
using System.Collections.Concurrent; | |
using System.Diagnostics; | |
using System.Net.Http.Json; | |
using System.Text.Json.Serialization; | |
using System.Text.RegularExpressions; | |
var sw = Stopwatch.StartNew(); |