Skip to content

Instantly share code, notes, and snippets.

View stanislavhordiyenko's full-sized avatar

Stanislav Hordiyenko stanislavhordiyenko

View GitHub Profile
FROM python:3.8-slim
WORKDIR /tests
RUN apt update && \
apt install -y --no-install-recommends firefox-esr=102.10.0esr-1~deb11u1 && \
apt install -y curl && \
apt clean && \
curl -L https://github.com/mozilla/geckodriver/releases/download/v0.33.0/geckodriver-v0.33.0-linux64.tar.gz -o geckodriver.tar.gz && \
tar xvf geckodriver.tar.gz && \
@stanislavhordiyenko
stanislavhordiyenko / README.md
Last active September 8, 2021 11:33
gcp-default-ingress-and-traefik
  1. Make sure that Traefik service is installed as a NodeGroup (it can be done with Helm);
  2. Create global static ip address in GCP (i.e. my-static-ip);
  3. Deploy default ingress with kubectl command:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: catch-all-ingress
  # Namespace where the Traefik is running
  namespace: traefik
@stanislavhordiyenko
stanislavhordiyenko / virtual_directory_exists.ps1
Created August 24, 2017 23:58
Test-VirtualDirectory function will help you to find out whether virtual directory exists in IIS from powershell script
Import-Module WebAdministration
function Test-VirtualDirectory
{
param(
[string]$WebsiteName,
[string]$VirtualDirectoryPath
)
if (-not (Test-Path "IIS:\Sites\$WebsiteName")) {
@stanislavhordiyenko
stanislavhordiyenko / trigger_new_build_in_teamcity.md
Last active July 12, 2017 00:07
Below there are two examples how to trigger a new build in TeamCity with parameters

In the command line:

$ curl -X POST -u username:password -d  '<build><buildType id="<build type id in teamcity>"/><comment><text>Build was triggered by curl.</text></comment><properties><property name="<parameter name>" value="<parameter value>"/></properties></build>' http://<teamcity host>/httpAuth/app/rest/buildQueue --header "Content-Type: application/xml" -H "Accept: application/json"

It should return JSON response. State field should have queued value.

@stanislavhordiyenko
stanislavhordiyenko / replace_text_in_multi_line_string_1.ps1
Created July 7, 2017 06:27
Replace text in multi line string in PowerShell. Below you can find several powershell examples how to replace text in a multi line string with regular expressions.
$text = "
This is
__
a multi line
string
__
with some marks in it.
"
# Here we remove a text in the multiline string between two marks
@stanislavhordiyenko
stanislavhordiyenko / create_temporary_file_v4.ps1
Created June 27, 2017 05:34
Create Temporary Files in PowerShell
# Create temporary file with PowerShell 4 or lower
$TempFile = [System.IO.Path]::GetTempFileName()
Write-Output "Temporary file has been created. It is located here: $($TempFile)"
Remove-Item $TempFile -Force