Skip to content

Instantly share code, notes, and snippets.

View gdm's full-sized avatar

Dmytro Gorbunov gdm

View GitHub Profile
@gdm
gdm / testmail.pl
Created May 1, 2019 00:07
test SMTP perl
#!/usr/bin/perl
use strict;
use warnings;
# first, create your message
use Email::MIME;
my $message = Email::MIME->create(
header_str => [
From => 'sh...@test.com',
To => 'dm..@test.com',
const _ = require('lodash');
// sum of array's elements (lodash)
_.sum([4, 2, 8, 6]);
//or
[1, 2, 3, 4].reduce((a, b) => a + b, 0)
// max-min element of array
Math.max( ...arr );
Source: https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs
# most recently used/needed: journalctl -u nginx.service
# kernel messages (the same as dmesg -T?): journalctl -k
# monitoring journalctl -f, journalctl -n 20,
journalctl --utc
# since most recent re/boot
journalctl -b
#
@gdm
gdm / gist:21a25d77bd11110fdfeb9f4298015e14
Created May 28, 2019 22:38
postfix + aws ses integration
+ integrate with bounce using https://serverfault.com/questions/412638/block-outgoing-mail-to-specific-address-using-postfix
@gdm
gdm / cloudformation-resources.md
Created June 15, 2019 21:33
AWS-Cloudformation
@gdm
gdm / thank-you.md
Last active June 16, 2019 12:48
How to respond to thank you
@gdm
gdm / LFS158x.md
Last active June 27, 2019 22:21
K8s EDX course outcome
@gdm
gdm / get-jenkins-plugins.sh
Created October 9, 2020 10:49
Get jenkins plugins
# Generates list of jenkins plugins compatible with /usr/local/bin/install-plugins.sh (distributed in jenkins Docker)
# The output of this command (colon-separated list of items like 'htmlpublisher:1.23') should be
# passed as an input for /usr/local/bin/install-plugins.sh script
curl -u $JENKINS_USER:$JENKINS_PASSWORD \
"http://localhost:8080/pluginManager/api/xml?depth=1&xpath=/*/*/shortName|/*/*/version&wrapper=plugins" | \
perl -pe 's/.*?<shortName>([\w-]+).*?<version>([^<]+)(<\/\w+>)+/\1 \2\n/g' | \
sed 's/ /:/' | sort
@gdm
gdm / jenkins-is-dead.md
Created October 11, 2020 11:39 — forked from michaellihs/jenkins-is-dead.md
Jenkins is dead - long live Jenkins!

Jenkins is dead - long live Jenkins!

Brainstorming

  • Basic Concepts
    • Continuous Delivery

      Delivering Software with confidence, small increments, frequent releases, requires automated tested, automated deployment, automated infrastructure

  • Pipelines