Skip to content

Instantly share code, notes, and snippets.

View auth-day's full-sized avatar
🙃
yum yum yum

Dmitry B auth-day

🙃
yum yum yum
  • Russia saint petersburg
View GitHub Profile
@josh-padnick
josh-padnick / tf-bar.tf
Last active December 15, 2021 17:55
Hack for Terraform Module depends_on
# This file would need to be in its own folder like /tf-bar/main.tf
variable "bar" {
default = "foo"
}
resource "null_resource" "bar" {
triggers {
bar = "${var.bar}"
}
@jpswade
jpswade / devops_best_practices.md
Last active November 18, 2024 02:16
Devops Best Practices Checklist

Find the original here article here: Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, at the Agile Conference in Toronto, Andrew Shafer posted an offer to moderate an ad hoc "Birds of a Feather" meeting to discuss the topic of "Agile Infrastructure". Only one person showed up to discuss the topic: Patrick Debois. Their discussions and sharing of ideas with others advanced the concept of "agile systems administration". Debois and Shafer formed an Agile Systems Administrator group on Google, with limited success. Patrick Debois did a presentation called "Infrastructure and Operations" addressing

def getProjectName() {
return 'JenkinsPipeline'
}
def getJDKVersion() {
return 'jdk1.8.0_101'
}
def getMavenConfig() {
return 'maven-config'
@alistairewj
alistairewj / install-postgres-10-ubuntu.md
Last active October 3, 2024 00:19
Install PostgreSQL 10 on Ubuntu

Install PostgreSQL 10 on Ubuntu

This is a quick guide to install PostgreSQL 10 - tested on Ubuntu 16.04 but likely can be used for Ubuntu 14.04 and 17.04 as well, with one minor modification detailed below.

(Optional) Uninstall other versions of postgres

To make life simple, remove all other versions of Postgres. Obviously not required, but again, makes life simple. If you have data in your previous version of postgres that you'd like to retain, then this is not recommended. Instead, you'll have to use pg_upgrade or pg_upgradecluster.

@oifland
oifland / Jenkinsfile
Last active July 15, 2024 06:36
Loops in Jenkinsfiles
// Related to https://issues.jenkins-ci.org/browse/JENKINS-26481
abcs = ['a', 'b', 'c']
node('master') {
stage('Test 1: loop of echo statements') {
echo_all(abcs)
}
stage('Test 2: loop of sh commands') {
# Install https://www.vaultproject.io/
brew install vault
# Start dev vault server in a separate terminal
vault server -dev
# ==> Vault server configuration:
# ...
# Unseal Key: 7ACQHhLZY5ivzNzhMruX9kSa+VXCah3y87hl3dPSWFk=
# Root Token: 858a6658-682e-345a-e4c4-a6e14e6f7853

Kafka installation with systemd

0. Create kafka user

sudo adduser kafka
sudo adduser kafka sudo
su -l kafka

1. Download and Install kafka archive

<?php
$base64_usrpwd = base64_encode($_POST['user'].':'.$_POST['pass']);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://localhost:8080/rest/api/2/issue/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json',
'Authorization: Basic '.$base64_usrpwd));
<html>
<head>
<script src="jquery-2.1.4.js"></script>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<div id="wrapper">
<h1>Create Issue</h1>
<form id="create-form">
Summary: <input type="text" name="summary" id="summary" value=""/>