This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DEVICE=/dev/$(lsblk -n | awk '$NF != "/" {print $1}') | |
FS_TYPE=$(file -s $DEVICE | awk '{print $2}') | |
MOUNT_POINT=/data | |
# If no FS, then this output contains "data" | |
if [ "$FS_TYPE" = "data" ] | |
then | |
echo "Creating file system on $DEVICE" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
This is an example of how to send data to Slack webhooks in Python with the | |
requests module. | |
Detailed documentation of Slack Incoming Webhooks: | |
https://api.slack.com/incoming-webhooks | |
''' | |
import json | |
import requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @see https://www.hackerrank.com/challenges/fractal-trees-all | |
# Creating a Fractal Tree from Y-shaped branches | |
# | |
# This challenge involves the construction of trees, in the form of ASCII Art. | |
# | |
# We have to deal with real world constraints, so we cannot keep repeating the pattern infinitely. | |
# So, we will provide you a number of iterations, and you need to generate the ASCII version | |
# of the Fractal Tree for only those many iterations (or, levels of recursion). A few samples are provided below. | |
# | |
# Input Format |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_template/template_nginx_access_log | |
{ | |
"index_patterns" : "*-nginx-access*", | |
"order" : 1, | |
"settings" : { | |
"number_of_shards" : 2, | |
"number_of_replicas" : 0, | |
"codec" : "best_compression" | |
}, | |
"mappings" : { |