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
| internal static class DeviceFingerprintProvider | |
| { | |
| public static async Task<string> DeviceFingerprintAsync() | |
| { | |
| DeviceFingerprintProvider.DiskSpace diskSpace = await DeviceFingerprintProvider.GetDiskSpaceAsync(); | |
| List<string> appNames = new List<string>(); | |
| string fingerprintFormat = "{{\n dfid: {{\n \"tds\": {0},\n \"fds\": {1},\n \"boot_time\": {2},\n \"apps\": {{\n \"version\": 0,\n \"names\": [{3}]\n }}\n }}\n}}"; | |
| ulong tds = diskSpace.TotalSpace / 1024UL; | |
| ulong fds = diskSpace.FreeSpace / 1024UL; | |
| ulong bootTime = await DeviceFingerprintProvider.UnixBootTimeAsync(); |
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
| <!DOCTYPE html> | |
| <html> | |
| <head lang="en"> | |
| <meta charset="UTF-8"> | |
| <title></title> | |
| <!--[if lt IE 9]> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script> | |
| <![endif]--> | |
| </head> | |
| <body> |
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
| internal class AvoidHang : IDisposable | |
| { | |
| private readonly SemaphoreSlim _semaphore = new System.Threading.SemaphoreSlim(1, 1); | |
| public void Dispose() | |
| { | |
| _semaphore.Dispose(); | |
| } | |
| public void ToAvoidHang(int fast = 1000, Action action = 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
| private async WaitSeconds(int e) | |
| { | |
| await Task.Delay(e); | |
| } |
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
| <bdi>This is Egypt</bdi> | |
| <bdi>هي Egypt</bdi> | |
| <bdi>هي مصر</bdi> |
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
| <?php | |
| /** | |
| * Translates a number to a short alhanumeric version | |
| * | |
| * Translated any number up to 9007199254740992 | |
| * to a shorter version in letters e.g.: | |
| * 9007199254740989 --> PpQXn7COf | |
| * | |
| * specifiying the second argument true, it will | |
| * translate back e.g.: |
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
| class ShortId | |
| { | |
| public static readonly string Alphabet = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
| private static decimal BcPow(double a, double b) | |
| { | |
| return Math.Floor((decimal)Math.Pow(a, b)); | |
| } | |
| public static ulong Decode(string value, int pad = 0) |
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
| MessageBox(_T("Help, Something went wrong."), _T("Error"), MB_ICONERROR | MB_OK); |
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
| Imports System.Reflection | |
| Imports System.Threading.Tasks | |
| Public Class ColorAnimator | |
| Public obj As New Object | |
| Dim boolStop As New List(Of System.Threading.CancellationTokenSource) | |
| Public Async Function Animate(ctrl As Control, prop As PropertyInfo, newColor As Color) As Threading.Tasks.Task | |
| Dim oldColor As Color | |
| Dim StopAni As New System.Threading.CancellationTokenSource |
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
| Dim graphics_path As New GraphicsPath | |
| Dim m() As Point = {New Point(23, 62), New Point(31, 56), New Point(37, 53), New Point(38, 53), New Point(45, 51), New Point(53, 53), New Point(60, 55), New Point(65, 54), New Point(65, 49), New Point(62, 42), New Point(61, 35), New Point(65, 27), New Point(73, 23), New Point(81, 22), New Point(86, 25), New Point(86, 26), New Point(92, 23), New Point(93, 29), New Point(92, 41), New Point(90, 45), New Point(91, 49), New Point(91, 52), New Point(88, 54), New Point(88, 59), New Point(86, 61), New Point(84, 65), New Point(77, 68), New Point(83, 74), New Point(91, 77), New Point(96, 81), New Point(105, 86), New Point(103, 93), New Point(95, 95), New Point(88, 92), New Point(81, 90), New Point(76, 89), New Point(56, 102), New Point(52, 103), New Point(53, 100), New Point(48, 102), New Point(45, 110), New Point(38, 117), New Point(29, 120), New Point(23, 120), New Point(19, 119), New Point(14, 122), New Point(11, 121), New Point(11, 117), New Point(19, 112), New Point(28, 111), |