Skip to content

Instantly share code, notes, and snippets.

Avatar

Vladimir Vissoultchev wqweto

  • Unicontsoft
  • Sofia, Bulgaria
View GitHub Profile
@wqweto
wqweto / Program.cs
Created Oct 13, 2021
ECDSA server certificate signed by a ECDSA self-signed CA
View Program.cs
using System;
using System.IO;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
@wqweto
wqweto / msvbvm60_3.tlb
Created May 13, 2021
Typelib resource ID 3 from MSVBVM60.DLL
View msvbvm60_3.tlb
// Generated .IDL file (by the OLE/COM Object Viewer)
//
// typelib filename: 3
[
uuid(EA544A21-C82D-11D1-A3E4-00A0C90AEA82),
version(6.0),
helpstring("Visual Basic runtime objects and procedures"),
helpfile("VB98.CHM"),
helpcontext(0x000df908)
@wqweto
wqweto / Form1.frm
Created Jan 27, 2021
Large string array
View Form1.frm
Option Explicit
Private Sub Form_Load()
Const STR_NAMES1 As String = "|Thousand|Million|Billion|Trillion|Quadrillion|Quintillion|Sextillion|Septillion|Octillion|Nonillion|Decillion|Undecillion|Duodecillion|Tredecillion|Quattuordecillion|Quindecillion|Sexdecillion|Septendecillion|Octodecillion|Novemdecillion|Vigintillion|Unvigintillion|Duovigintillion|Trevigintillion|Quattuorvigintillion|Quinvigintillion|Sexvigintillion|Septenvigintillion|Octovigintillion|Novemvigintillion|Trigintillion|Untrigintillion|Duotrigintillion|Tretrigintillion|Quattuortrigintillion|Quintrigintillion|Sextrigintillion|Septtrigintillion|Octotrigintillion|Novemtrigintillion|Quadragintillion|Unquadragintillion|Duoquadragintillion|Trequadragintillion|Quattuorquadragintillion|Quinquadragintillion|Sexquadragintillion|Septquadragintillion|Octoquadragintillion|Novemquadragintillion|Quinquagintillion|Unquinquagintillion|Duoquinquagintillion|Trequinquagintillion|Quattuorquinquagintillion" & _
"|Quinquinquagint
@wqweto
wqweto / dump.txt
Created Oct 31, 2020
Firefox 82.0.2 handshake traffic
View dump.txt
TlsHandshake.Input
0000 - 16 03 01 02 00 01 00 01 FC 03 03 34 10 C3 43 D6 ........ь..4.ГCЦ
0010 - 88 64 7F 28 A7 97 CB 88 4D E5 08 D5 A3 BF 5D 37 €d(§—Л€Mе.ХЈї]7
0020 - FD DF 57 F5 3E AB BE D7 4E 28 D0 20 8E 9E 61 A4 эЯWх>«ѕЧN(Р Ћћa¤
0030 - 7A 02 66 E5 0D B4 4B 16 9E EB D0 D8 AD 50 0F 6C z.fе.ґK.ћлРШ­P.l
0040 - A3 A0 7F D6 CB 09 B4 72 49 97 BF 8F 00 24 13 01 Ј ЦЛ.ґrI—їЏ.$..
0050 - 13 03 13 02 C0 2B C0 2F CC A9 CC A8 C0 2C C0 30 ....А+А/М©МЁА,А0
0060 - C0 0A C0 09 C0 13 C0 14 00 9C 00 9D 00 2F 00 35 А.А.А.А..њ.ќ./.5
0070 - 00 0A 01 00 01 8F 00 17 00 00 FF 01 00 01 00 00 .....Џ....я.....
0080 - 0A 00 0E 00 0C 00 1D 00 17 00 18 00 19 01 00 01 ................
@wqweto
wqweto / Form1
Created Oct 14, 2020
Execution order
View Form1
Option Explicit
Private Function A() As Long
A = 1
MsgBox "A"
End Function
Private Function B() As Long
B = 2
@wqweto
wqweto / rant.sql
Created Apr 20, 2020
Writing clever cursor loops in T-SQL (not using the hot-mess from BOL)
View rant.sql
IF OBJECT_ID('dbo.zero_ten') IS NOT NULL DROP TABLE dbo.zero_ten
GO
SET NOCOUNT ON
CREATE TABLE dbo.zero_ten (id INT PRIMARY KEY)
INSERT dbo.zero_ten(id)
SELECT 0
@wqweto
wqweto / Form1.frm
Last active Dec 10, 2019
CRC32 calculation benchmark
View Form1.frm
Option Explicit
Private Declare Function QueryPerformanceCounter Lib "kernel32" (lpPerformanceCount As Currency) As Long
Private Declare Function QueryPerformanceFrequency Lib "kernel32" (lpFrequency As Currency) As Long
Private Declare Function RtlComputeCrc32 Lib "ntdll" (ByVal dwInitial As Long, pData As Any, ByVal iLen As Long) As Long
Private Sub Form_Click()
Const ITERS As Long = 100000
Dim baBuffer() As Byte
Dim lIdx As Long
View keybase.md

Keybase proof

I hereby claim:

  • I am wqweto on github.
  • I am wqweto (https://keybase.io/wqweto) on keybase.
  • I have a public key ASDomFHdT9_NTPnvRMzbrIWaHI2D_Art4OYOKkzpcLN76wo

To claim this, I am signing this object:

@wqweto
wqweto / mdPostFile.bas
Created May 5, 2019
Send JSON and binary file as multipart request
View mdPostFile.bas
Option Explicit
Private Function pvPostFile(sUrl As String, sJSON As String, sFileName As String, Optional ByVal bAsync As Boolean) As String
Const STR_BOUNDARY As String = "864d391d-4097-44e0-92e1-71aff17094c1"
Dim nFile As Integer
Dim baBuffer() As Byte
Dim sPostData As String
'--- read file
nFile = FreeFile
@wqweto
wqweto / mdMedianBlur.bas
Last active Oct 18, 2019
Fast O(N) median filter for GDI+ bitmaps impl w/ SSE2 thunks based on http://nomis80.org/ctmf.c
View mdMedianBlur.bas
Option Explicit
DefObj A-Z
'--- for VirtualProtect
Private Const PAGE_EXECUTE_READWRITE As Long = &H40
Private Const MEM_COMMIT As Long = &H1000
'--- for CryptStringToBinary
Private Const CRYPT_STRING_BASE64 As Long = 1
'--- for GdipBitmapLockBits
Private Const ImageLockModeRead As Long = &H1