This file contains 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
<?php | |
/* A modified version of the monitoring script described in the article at | |
https://medium.com/winkhosting/server-monitoring-with-php-and-bash-scripts-c078616a6e2f | |
For demonstration purposes only | |
Since the monitor script does not send files, the script is written | |
to handle the POST request via routes | |
*/ |
This file contains 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
#!/usr/bin/env bash | |
# A modified version of the monitoring script described in the article | |
# at https://medium.com/winkhosting/server-monitoring-with-php-and-bash-scripts-c078616a6e2f | |
# | |
# For demonstration purposes only | |
# | |
# The main idea is to avoid temporary files | |
# Timers (in seconds) |
This file contains 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 | |
FILE=$1 | |
jq -r '(map(keys) | add | unique) as $cols | map(. as $row | $cols | map($row[.])) as $rows | $cols, $rows[] | @csv' |
This file contains 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
###################################################################### | |
# Basic console stuff # | |
###################################################################### | |
brew 'git' | |
brew 'git-extras' | |
brew 'ncdu' | |
brew 'tree' | |
brew 'nnn' |
This file contains 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
version: '2' | |
volumes: | |
logs: | |
driver: local | |
services: | |
mysql: | |
image: mysql:5.7 | |
volumes: |
This file contains 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
require 'csv' | |
require 'yaml' | |
filename = ARGV[0] | |
csv = CSV.read(filename, :headers => true, :col_sep => ';').map(&:to_hash) | |
puts csv.to_yaml |
This file contains 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
--- | |
- name: Set Time Zone | |
hosts: local | |
remote_user: pi | |
become: yes | |
become_method: sudo | |
gather_facts: false | |
vars: | |
- timezone: 'Europe/Bratislava' | |
tasks: |