Skip to content

Instantly share code, notes, and snippets.

View stijnsanders's full-sized avatar

Stijn Sanders stijnsanders

View GitHub Profile
@stijnsanders
stijnsanders / fixdpb.dpr
Created September 23, 2023 20:07
(Ab)Use the Delphi IDE to get your project built, but still get the output over standard out.
program fixdpb;
{$APPTYPE CONSOLE}
uses
Windows,
SysUtils,
Classes;
var
unit WinHttpWS;
interface
uses Windows;
const
// flags for WinHttpOpen
WINHTTP_FLAG_ASYNC = $10000000; // this session is asynchronous (where supported)
WINHTTP_FLAG_SECURE_DEFAULTS = $30000000; // note that this flag also forces async
@stijnsanders
stijnsanders / pxsvg.dpr
Last active June 17, 2021 21:42
quick and dirty conversion of png to svg
program pxsvg;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
pxsvg1 in 'pxsvg1.pas';
@stijnsanders
stijnsanders / Ping2.pas
Created February 8, 2019 11:41
Ping2.pas
unit Ping2;
interface
function PingHost(const HostName:string;TimeoutMS:cardinal=500):boolean;
implementation
uses Windows, SysUtils, WinSock, Sockets;
@stijnsanders
stijnsanders / SmartPort.pas
Created March 3, 2017 15:29
SmartPort: bare-bones wrapper for a serial connection (with some USB support)
unit SmartPort;
interface
uses Windows, SysUtils, Classes;
{$D-}
type
TSmartPortParity=(ppParityEven,ppParityMark,ppParityNone,ppParityOdd,ppParitySpace);
@stijnsanders
stijnsanders / SendSMS.pas
Created March 3, 2017 15:27
Send SMS over 'USB modem' connected mobile phone
unit SendSMS;
interface
procedure DoSendSMS(const ToNr,Msg:string);
implementation
uses Windows, SysUtils, Classes, Registry, SmartPort;
@stijnsanders
stijnsanders / gmail.css
Last active January 20, 2021 10:24
personal CSS for Stylish to apply to GMail (see also http://yoy.be/GMailLargerLabelsMenu.html
BODY,
INPUT,
TD {
font-family: "PT Sans", sans-serif;
line-height: 1.12;
}
.G-atb{
height:32px;
}
.Wg {
unit MSDASC_TLB;
// ************************************************************************ //
// WARNING
// -------
// The types declared in this file were generated from data read from a
// Type Library. If this type library is explicitly or indirectly (via
// another type library referring to this type library) re-imported, or the
// 'Refresh' command of the Type Library Editor activated while editing the
// Type Library, the contents of this file will be regenerated and all
@stijnsanders
stijnsanders / Acrobat_TLB.pas
Created March 27, 2015 12:11
Adobe Acrobat 8.0 Type Library Delphi unit without wrappers
unit Acrobat_TLB;
// ************************************************************************ //
// WARNING
// -------
// The types declared in this file were generated from data read from a
// Type Library. If this type library is explicitly or indirectly (via
// another type library referring to this type library) re-imported, or the
// 'Refresh' command of the Type Library Editor activated while editing the
// Type Library, the contents of this file will be regenerated and all
@stijnsanders
stijnsanders / FDFACXLib_TLB.pas
Created January 22, 2015 21:14
Delphi ActiveX/COM wrapper for FDFACX.DLL
unit FDFACXLib_TLB;
// ************************************************************************ //
// WARNING
// -------
// The types declared in this file were generated from data read from a
// Type Library. If this type library is explicitly or indirectly (via
// another type library referring to this type library) re-imported, or the
// 'Refresh' command of the Type Library Editor activated while editing the
// Type Library, the contents of this file will be regenerated and all