Skip to content

Instantly share code, notes, and snippets.

View HemulGM's full-sized avatar
🟢
Working while it's working

HemulGM

🟢
Working while it's working
View GitHub Profile
@HemulGM
HemulGM / skia_frames.pas
Created August 16, 2022 19:22
skia frames render
uses Skia, Skia.FMX;
procedure TForm3.FormCreate(Sender: TObject);
var
Buffer: TBitmap;
begin
var Lottie := TSkottieAnimation.MakeFromFile('D:\Downloads\3-8472.json');
Lottie.SeekFrameTime(0);
var Tick := Lottie.Duration / (Lottie.Duration * Lottie.FPS);
var i := Tick;
@HemulGM
HemulGM / hh_delphi_stat.pas
Created September 14, 2021 19:32
hh_delphi_stat
program hh_delphi_stat;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
System.JSON,
System.StrUtils,
System.NetEncoding,
program hh_delphi_stat;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
System.JSON,
System.StrUtils,
System.NetEncoding,
@HemulGM
HemulGM / IndyAsyncPing.pas
Created November 25, 2020 18:48
Delphi, Indy, Async Ping
uses
IdComponent, IdIcmpClient, System.Threading;
type
TPing = class
private
FMySelf: TPing;
FProc: TProc<Integer>;
procedure FOnReply(ASender: TComponent; const AReplyStatus: TReplyStatus);
procedure FOnStatus(ASender: TObject; const AStatus: TIdStatus; const AStatusText: string);
type
TImageListHelper = class helper for TImageList
function Add(ABitmap: TBitmap): integer;
end;
...
function TImageListHelper.Add(aBitmap: TBitmap): integer;
const
SCALE = 1;
program VKBotTemplate;
{$APPTYPE CONSOLE}
{$R *.res}
uses
Winapi.Windows,
Winapi.Messages,
System.SysUtils,
function GetParamStr(P: PChar; var Param: string): PChar;
var
i, Len: Integer;
Start, S: PChar;
begin
// U-OK
while True do
begin
while (P[0] <> #0) and (P[0] <= ' ') do
Inc(P);
unit uDownload;
interface
uses
Winapi.Windows,
System.SysUtils,
System.Classes,
IdComponent,
IdHTTP;
unit Unit3;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
System.Classes, System.Types, Vcl.Graphics, Vcl.Controls, Vcl.Forms,
Vcl.Dialogs, System.Net.HttpClient, Vcl.StdCtrls;
type
@HemulGM
HemulGM / ConvertWavToOgg.pas
Created February 29, 2020 04:03
Convert Wav To Ogg
uses
bass, bassenc;
function ConvertWavToOgg(var Target: string; DeleteSource: Boolean): Boolean;
var
Stream: HSTREAM;
Encode: HENCODE;
Cmd, Old: string;
Bytes: TByteArray;
begin