Skip to content

Instantly share code, notes, and snippets.

Aleksey Timohin tdelphi

Block or report user

Report or block tdelphi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tdelphi
tdelphi / AnsibleHowToWaitForWebServerToStart.md
Last active Aug 1, 2019
Ansbile - wait for webserver to start
View AnsibleHowToWaitForWebServerToStart.md

• В конце добавить 3 таска

  • name: wait 2 minutes for webserver to start shell: 'curl --head --silent "https://{{ inventory_hostname }}/"' register: result ignore_errors: True async: 120 poll: 1 failed_when: false

  • name: fail if response is not 200

@tdelphi
tdelphi / killProcessesByName.gradle
Created Dec 22, 2017
gradle task to kill all processes by name
View killProcessesByName.gradle
task killChromeDrivers(type:Exec) {
commandLine 'taskkill', '/f', '/im', 'chromedri*'
ignoreExitValue = true
}
View JenkinsHowto.md

Jenkins dsl to create job params

pipeline {
    agent any
    parameters {
        string(name: 'PERSON', defaultValue: 'Mr Jenkins', description: 'Who should I say hello to?')
    }
    stages {
        stage('Example') {
            steps {
@tdelphi
tdelphi / LazyCursorHelperLabmda.pas
Created Dec 22, 2015
tlazyCursorChanger based on Barry K method
View LazyCursorHelperLabmda.pas
type
TScopeExitNotifier = class(TInterfacedObject)
private
FProc: TProc;
public
constructor Create(const AProc: TProc);
destructor Destroy; override;
end;
constructor TScopeExitNotifier.Create(const AProc: TProc);
@tdelphi
tdelphi / uLazyCursorHelper.pas
Created Sep 16, 2015
#delphi helper class to work with cursor
View uLazyCursorHelper.pas
//MMWIN:CLASSCOPY
unit uLazyCursorHelper;
interface
uses
Controls;
type
/// <summary>
@tdelphi
tdelphi / programThatUsesFreedObject.dpr
Last active Jan 4, 2016
example of using freed objet in Delphi. Works without any errors in D6
View programThatUsesFreedObject.dpr
program programThatUsesFreedObject;
{$APPTYPE CONSOLE}
uses
Classes,
SysUtils;
var
tmpSL: TStringList;
@tdelphi
tdelphi / record_to_string.dpr
Last active Dec 24, 2015
Delphi record to string conversion example, using operator overload. #delphi
View record_to_string.dpr
program Project2;
{$APPTYPE CONSOLE}
uses
SysUtils;
type
TLocString = record
Key, Value: string;
You can’t perform that action at this time.