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 | |
# Here short description of this script | |
# This is just a template to be used for writing new bash scripts | |
### | |
# Based on Google Style Guide: https://google.github.io/styleguide/shell.xml | |
# General remarks | |
# * Executables should have no extension (strongly preferred) or a .sh extension. | |
# * Libraries must have a .sh extension and should not be executable |
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
############################################################################### | |
# DESC: Parses arguments with the bash built-in getopts, but allows for | |
# long options too. This only works when each long option has a short option, | |
# although short options need not have long ones. Designed to create global | |
# variables named opt_<option> containing the parsed command line options, and | |
# an array variable called opt_args with any additional non-option arguments. | |
# This is all hard coded, but simple to modify for local use. See the ### | |
# sections for what needs to be changed to create your own option variable set. | |
# Supports bundled options and the use of "--" to signal end of options. | |
# Does not support negated options. You can always just declare "myFlag" and |
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
terraform { | |
required_version = ">=0.12, <0.13" | |
} |
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
# Database configuration | |
######################## | |
# Use this file as database custom configuration file | |
DB_NAME='mydb' | |
DB_HOST='127.0.0.1' | |
DB_USER='usr' | |
DB_PASSWD='pwd' |
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
Dir.glob("#{ENV['HOME']}/Library/Application Support/Viscosity/OpenVPN/*/config.conf").each do |file| | |
certificate_files = ['ca', 'cert', 'key', 'tls-auth'] | |
config_dir = File.dirname(file) | |
connection_name = nil | |
new_config = [] | |
File.read(file).lines.each do |line| | |
line.strip! | |
if line.start_with?('#viscosity name') |