$ mkfs.xfs /dev/vdb
Execute in all nodes(node1, node2,node3 ....)
$ mkdir /storage/bricks/1 -p
# Redis configuration file example | |
# Note on units: when memory size is needed, it is possible to specify | |
# it in the usual form of 1k 5GB 4M and so forth: | |
# | |
# 1k => 1000 bytes | |
# 1kb => 1024 bytes | |
# 1m => 1000000 bytes | |
# 1mb => 1024*1024 bytes | |
# 1g => 1000000000 bytes |
version: '3.3' | |
services: | |
kafka-1: | |
image: wurstmeister/kafka:1.1.0 | |
environment: | |
KAFKA_BROKER_ID: '1' | |
KAFKA_CONTROLLER_SHUTDOWN_ENABLE: 'true' | |
KAFKA_DEFAULT_REPLICATION_FACTOR: '3' | |
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: '3000' | |
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE |
sudo dd if=/dev/zero of=/var/swapfile bs=1M count=2048 && \ | |
sudo chmod 600 /var/swapfile && \ | |
sudo mkswap /var/swapfile && \ | |
echo /var/swapfile none swap defaults 0 0 | sudo tee -a /etc/fstab && \ | |
sudo swapon -a |
function objectToQuerystring (obj) { | |
return Object.keys.reduce(function (str, key, i) { | |
var delimiter, val; | |
delimiter = (i === 0) ? '?' : '&'; | |
key = encodeURIComponent(key); | |
val = encodeURIComponent(obj[key]); | |
return [str, delimiter, key, '=', val].join(''); | |
}, ''); | |
} |
pipeline { | |
agent { node { label 'swarm-ci' } } | |
environment { | |
TEST_PREFIX = "test-IMAGE" | |
TEST_IMAGE = "${env.TEST_PREFIX}:${env.BUILD_NUMBER}" | |
TEST_CONTAINER = "${env.TEST_PREFIX}-${env.BUILD_NUMBER}" | |
REGISTRY_ADDRESS = "my.registry.address.com" | |
SLACK_CHANNEL = "#deployment-notifications" |
server { listen 80; | |
server_name example.com; | |
access_log /var/log/example.com/nginx.access.log; | |
error_log /var/log/example.com/nginx.error.log; | |
root /var/www/apps/example.com/public; | |
charset utf-8; | |
location / { | |
rewrite ^ https://$host$request_uri? permanent; | |
} |
#!/bin/bash | |
# Get postman app | |
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz | |
sudo tar -xzf postman.tar.gz -C /opt | |
sudo ln -s /opt/Postman/Postman /usr/bin/postman | |
#Create a Desktop Entry | |
cat > ~/.local/share/applications/postman.desktop <<EOL | |
[Desktop Entry] | |
Encoding=UTF-8 |
<?php | |
/** | |
* simple method to encrypt or decrypt a plain text string | |
* initialization vector(IV) has to be the same when encrypting and decrypting | |
* | |
* @param string $action: can be 'encrypt' or 'decrypt' | |
* @param string $string: string to encrypt or decrypt | |
* | |
* @return string | |
*/ |
/** | |
* Class to check up e-mail | |
* | |
* @author Konstantin Granin <kostya@granin.me> | |
* @copyright Copyright (c) 2010, Konstantin Granin | |
*/ | |
class VerifyEmail { | |
/** |