Skip to content

Instantly share code, notes, and snippets.

View vladimir-v-marchenko's full-sized avatar

Volodymyr V. Marchenko vladimir-v-marchenko

  • Ukraine, Kyiv
  • 02:28 (UTC +02:00)
View GitHub Profile
@vladimir-v-marchenko
vladimir-v-marchenko / find_fixed_tickets.sh
Created July 3, 2025 12:46
Finds fixed tickets in repository
#!/bin/bash
#
# Finds fixed tickets in repository
#
# This script takes Organization, Repository, Github username, Password as inputs.
# It writes all the closed tickets in "closed-issues.txt" file.
#
read -p "Organization: " ORG; read -p "Repository: " REPO; read -p "Github username: " USER; read -s -p "Password: " PASS
CLOSED_FILE="closed-issues.txt"
if [[ ! -e $CLOSED_FILE ]]; then
d-i partman/early_command \
string debconf-set partman-auto/disk "$(list-devices disk | head -n1)"
#d-i debian-installer/locale string en_US.UTF-8
#d-i keyboard-configuration/xkb-keymap select us
### Localization
d-i debian-installer/locale string en_US.UTF-8
d-i debian-installer/keymap select us
d-i keymap select us
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAs/WawczG3eI6JrUPV5iUaiCws5VulzeXqe3xNjyVWbkO/HKlQmF7HVSMhakPjCtBK5S7R6PCKRkYpE4F7rFJ/YVpyBpGz5t3dLzKZ1GXxNW9yc9G5HNC2sVjaSWREpwypfXgDSrtkwtLuhGdddnDx5IOdVFj4C/+SVEfARwraK5YQDarsAwSGCtAEyZVlUWcH11s9KWO5Vqg1uE79nFSwW4+AbGEuCcr7Nm2QESAArVpqcHYptmh/5piZvzvrO9fTOspSJeztCZZiot+NBgnEx2Rbs6C9TGoue+YJvTitTmXyGbOfS/d+M+z8gp9bN3Nf8pFxBVlD1Wor+eNFF9SSQ== burzum@lynx
@vladimir-v-marchenko
vladimir-v-marchenko / links
Created November 22, 2022 00:19 — forked from abodacs/links
links collection of interesting stuff -- be careful --don't be evil !!
@vladimir-v-marchenko
vladimir-v-marchenko / gist:9d8813173f35be41e925d6a64d0fdfd6
Created August 8, 2022 13:27
Jenkins: checkout Gerrit patchset (Gerrit Trigger plugin)
Jenkins: checkout Gerrit patchset (Gerrit Trigger plugin)
Today I had to setup automatic pipeline triggering for each new patchset pushed to Gerrit for review. The Gerrit Trigger plugin makes it a piece of cake to achieve the goal.
In reply to How to Checkout a Gerrit Change in a Jenkins Sandbox Pipeline: such a snippet can be easily found directly in Jenkins > browse to your pipeline > click "configure" > click "pipeline syntax" > Sample step: select checkout: General SCM > fill what you need, click on advanced and add a refspec and generate the snippet. Here a snippet using the GERRIT variables exposed by the plugin.
node {
stage('checkout gerrit patchset') {
echo "gerrit branch: ${GERRIT_BRANCH}, gerrit refspec: ${GERRIT_REFSPEC}"
@vladimir-v-marchenko
vladimir-v-marchenko / getHTTPScertificate.groovy
Created May 16, 2022 10:33 — forked from alces/getHTTPScertificate.groovy
Get an HTTPS certificates from a given URL
conn = new URL('https://www.example.com').openConnection()
conn.connect()
println conn.serverCertificates.collect {
it.toString()
}.join('\n')
conn.disconnect()
@vladimir-v-marchenko
vladimir-v-marchenko / list_cacerts.groovy
Created May 16, 2022 10:33 — forked from alces/list_cacerts.groovy
Print a list of certificates stored in Java cacerts file
import java.security.*
ks = KeyStore.getInstance('jks')
new File('/etc/pki/java/cacerts').withInputStream {
ks.load(it, 'changeit'.chars)
}
ks.aliases().collect {
"$it: ${ks.getCertificate(it).toString()}"
upstream jenkins {
keepalive 32; # keepalive connections
server 127.0.0.1:8080; # jenkins ip and port
}
# Required for Jenkins websocket agents
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
@vladimir-v-marchenko
vladimir-v-marchenko / docker-api-port.md
Created June 29, 2021 08:11 — forked from styblope/docker-api-port.md
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
    
@vladimir-v-marchenko
vladimir-v-marchenko / S99iptables_nat.sh
Last active March 11, 2021 11:49
Just a couple of scripts that I need to configure my Synology 1511+ as a router
# Script to enable port forwarding and IP Masquerading, to share
# the primary internet connection to the second port of DS1512+
# Setup:
# cp S99iptables_nat.sh /usr/syno/etc.defaults/rc.d/S99iptables_nat.sh && reboot
action=$1
shift;
local INT_IFACE="eth1"
local IFCFG_FILE="/etc/sysconfig/network-scripts/ifcfg-${INT_IFACE}"