* 0 *
* *
* *
270 90
* *
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
| import os | |
| import sys | |
| import logging | |
| import sqlite3 | |
| from typing import Dict | |
| from dependency_injector.wiring import Provide, inject | |
| from dependency_injector import containers, providers |
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
| import asyncio | |
| import time | |
| from typing import TypeVar | |
| from mediatr import Mediator, GenericQuery | |
| T = TypeVar("T") | |
| class BaseQuery(GenericQuery[T]): |
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.Security.Cryptography; | |
| namespace Rfc6238; | |
| public enum HmacAlgo | |
| { | |
| Sha1, | |
| Sha256, | |
| Sha512, | |
| } |
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.Security.Cryptography; | |
| using Newtonsoft.Json; | |
| namespace Crypto; | |
| public struct PrivateKey | |
| { | |
| private byte[] D { get; init; } | |
| private byte[] P { get; init; } |
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
| #pragma warning disable CS0649 | |
| using ILGPU; | |
| using ILGPU.Runtime; | |
| namespace Hasher; | |
| public unsafe struct Sha256 | |
| { | |
| /**************************** VARIABLES *****************************/ |
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.Threading.Tasks.Dataflow; | |
| namespace AsyncQueue; | |
| /// <summary> | |
| /// A thread-safe asynchronous queue. | |
| /// </summary> | |
| /// <example> | |
| /// <code> | |
| /// var queue = new AsyncQueue`int(); |
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.Security.Claims; | |
| using System.Text; | |
| using System.IdentityModel.Tokens.Jwt; | |
| using Microsoft.IdentityModel.Tokens; | |
| namespace Diamond; | |
| public static class JwtTokenManager | |
| { |
Discord timestamps can be useful for specifying a date/time across multiple users time zones. They work with the Unix Timestamp format and can be posted by regular users as well as bots and applications.
The Epoch Unix Time Stamp Converter is a good way to quickly generate a timestamp. For the examples below I will be using the Time Stamp of 1543392060, which represents November 28th, 2018 at 09:01:00 hours for my local time zone (GMT+0100 Central European Standard Time).
| Style | Input | Output (12-hour clock) | Output (24-hour clock) |
|---|---|---|---|
| Default | <t:1543392060> |
November 28, 2018 9:01 AM | 28 November 2018 09:01 |