Skip to content

Instantly share code, notes, and snippets.

View AlexRogalskiy's full-sized avatar
🛰️
Work on stuff that matters

Alexander AlexRogalskiy

🛰️
Work on stuff that matters
View GitHub Profile
# Setup Cluster
for i in 1 2 3; do
docker-machine create -d virtualbox swarm-$i
done
eval $(docker-machine env swarm-1)
docker swarm init --advertise-addr $(docker-machine ip swarm-1)
# Source: https://gist.github.com/5b3cd6f336e2d9e6682c1a1792c860d0
####################
# Creating Cluster #
####################
# Docker for Desktop with Istio: https://gist.github.com/d9b92a8e03c2403624fcef25f3fcd4e5
# minikube with Istio: https://gist.github.com/01f562077f31750d24c8b7ef5b3ae4d0
# GKE with Istio: https://gist.github.com/80c379849b96f4ae5a2ccd30d843f205
# EKS with Istio: https://gist.github.com/957971fe8664de180ecc466a8da6017d
apiVersion: apps/v1
kind: Deployment
metadata:
name: theater-service-deployment
labels:
app: theater-service
spec:
replicas: 1
selector:
matchLabels:
apiVersion: apps/v1
kind: Deployment
metadata:
name: theater-service-deployment
labels:
app: theater-service
spec:
replicas: 1
selector:
matchLabels:
#!/bin/bash
# Set an admin login and password for your database
export adminlogin=<admin username>
export password=<admin password>
# The logical server name has to be unique in the system
export servername=<SQL server name>
# The ip address range that you want to allow to access your DB
@Slf4j
public class CustomerSteps extends CucumberBootstrap {
@Autowired
private CustomerRepository customerRepository;
//this method executes after every scenario
@After
public void cleanUp() {
log.info(">>> cleaning up after scenario!");
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-spring</artifactId>
<version>${cucumber.version}</version>
# Source: https://gist.github.com/6039be2497217a555fba5eafea076ba3
#########################################################################
# Werf: Glue Together Git, Docker, Helm, Kubernetes For CI/CD Pipelines #
# https://youtu.be/WM06S_ltcVs #
#########################################################################
# Additional Info:
# - werf: https://werf.io
# - GitHub CLI - How to manage repositories more efficiently: https://youtu.be/BII6ZY2Rnlc
@ijokarumawak
ijokarumawak / Query timestamp only by hours.md
Created December 15, 2021 03:10
A runtime field example at query time.
GET blogs/_search
{
  "runtime_mappings": {
    "publish_hour": {
      "type": "long",
      "script": {
        "source": "emit(doc['publish_date'].value.hour)"
      }
 }
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 4.
,React,Angular
Performance,Virtual DOM allows us to update the changes without rewriting the entire HTML doc virtually. This renders updates much faster and ensures fast performance – no matter of the apps' size.,"Real DOM, instead of changing just the piece of data required, updates the entire tree structure of HTML tables until it reaches the needed data."
Data Binding,"One-way binding makes the code more stable, and also makes debugging an app build with React versus Angular app much easier. ",Angular uses both one- and two-way data binding: changing data impacts view and changing view triggers changes in data. It is simpler to work with and makes the framework more flexible.
Component Architecture,"With React, you build components that manage their own state and structure them together into more complex UIs. React is easier to grasp, but it requires multiple integrations like Redux to use it's potential fully.","Angular is a pure full-fledged framework which comes with many out-of-the-box features like Rx