Skip to content

Instantly share code, notes, and snippets.

procedure TForm1.FormCreate(Sender: TObject);
begin
InitiateMRating;
SdfDtStCountries.FieldDefs.Add('id', ftInteger, 2);
SdfDtStCountries.Schema.Add('id');
SdfDtStCountries.FieldDefs.Add('iso', ftString, 2);
SdfDtStCountries.Schema.Add('iso');
SdfDtStCountries.FieldDefs.Add('continent', ftString, 2);
SdfDtStCountries.Schema.Add('continent');
@Al-Muhandis
Al-Muhandis / blcksock.pas
Last active February 15, 2020 13:44
Hack in blcksock.pas (laz_synapse.lpk 40.1)
procedure TTCPBlockSocket.HTTPTunnelDoConnect(IP, Port: string);
//bugfixed by Mike Green (mgreen@emixode.com)
var
s: string;
begin
//Port := IntToStr(ResolvePort(Port));
inherited Connect(FHTTPTunnelIP, FHTTPTunnelPort);
if FLastError <> 0 then
Exit;
FHTTPTunnel := False;
unit tableentities;
{$mode objfpc}{$H+}
{$interfaces corba}
interface
uses
Classes, SysUtils, dSQLdbBroker, fgl, fpjson, dClasses, dSqlBuilder
;
@Al-Muhandis
Al-Muhandis / taskworker.pas
Last active December 18, 2023 06:12
Worker thread template class with task queue (FIFO) without third-party components. FreePascal
unit taskworker;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils;
type
@Al-Muhandis
Al-Muhandis / InstagramScrapper.pas
Last active November 2, 2018 14:39
The piece of code for parsing timeless stories to my instagram [FreePascal language]
const
QryHash_HLStoriesIDs = '7c16654f22c819fb63d1183034a5162f';
QryHash_HLStories1 = '45246d3fe16ccc6577e0bd297a5db1ab';
{ ... ... ... }
function TInstagramParser.getHLStoriesForUser_internal(AUserID: Int64): Tjson_HLStories;
var
variables: TJSONObject;
HLIds, HL_reels: TJSONArray;
edge: TJSONEnum;
begin
@Al-Muhandis
Al-Muhandis / imageswebutils.pas
Last active December 18, 2023 06:12
Разбивка изображения. FreePascal
unit imageswebutils;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FPimage, FPImgCanv, fgl;
type
@Al-Muhandis
Al-Muhandis / your_site.conf
Created April 29, 2018 16:22
Настройка nginx для проксирования telegram серверов
#user 'sampleuser' virtual host 'telegramapi.sample.com' configuration file
server {
server_name telegramapi.sample.com www.telegramapi.sample.com;
... ... ...
location / {
proxy_set_header Host api.telegram.org;
proxy_pass https://api.telegram.org;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@Al-Muhandis
Al-Muhandis / freepascal-telegram-links.md
Created February 5, 2018 14:24
Useful links about freepascal in telegram and telegram in freepascal (and Lazarus IDE)