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
| [Unit] | |
| Description=PostgreSQL container | |
| Requires=docker.service | |
| After=docker.service | |
| [Service] | |
| Restart=on-failure | |
| RestartSec=10 | |
| ExecStartPre=-/usr/bin/docker stop postgres | |
| ExecStartPre=-/usr/bin/docker rm postgres |
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
| # How to encrypt/decrypt your text/blob secret with AWS KMS with AWS cli | |
| KEY_ID=alias/my-key | |
| SECRET_BLOB_PATH=fileb://my-secret-blob | |
| SECRET_TEXT="my secret text" | |
| ENCRYPTED_SECRET_AS_BLOB=encrypted_secret_blob | |
| DECRYPTED_SECRET_AS_BLOB=decrypted_secret_blob # Result of decrypt-blob target | |
| encrypt-text: |
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
| # Let us consider the following typical mysql backup script: | |
| mysqldump --routines --no-data -h $mysqlHost -P $mysqlPort -u $mysqlUser -p$mysqlPassword $database | |
| # It succeeds but stderr will get: | |
| # Warning: Using a password on the command line interface can be insecure. | |
| # You can fix this with the below hack: | |
| credentialsFile=/mysql-credentials.cnf | |
| echo "[client]" > $credentialsFile | |
| echo "user=$mysqlUser" >> $credentialsFile | |
| echo "password=$mysqlPassword" >> $credentialsFile |
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
| Key Sublime Text 3.2.1 Build 3207 | |
| ----- BEGIN LICENSE ----- | |
| Member J2TeaM | |
| Single User License | |
| EA7E-1011316 | |
| D7DA350E 1B8B0760 972F8B60 F3E64036 | |
| B9B4E234 F356F38F 0AD1E3B7 0E9C5FAD | |
| FA0A2ABE 25F65BD8 D51458E5 3923CE80 | |
| 87428428 79079A01 AA69F319 A1AF29A4 | |
| A684C2DC 0B1583D4 19CBD290 217618CD |
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 | |
| name=beta | |
| disk=4096 | |
| swap=1024 | |
| mem=4096 | |
| suite=precise | |
| ip="192.168.199.199" | |
| cpu=8 |
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 | |
| # ------------------------------------------------------------------------------ | |
| # FILE: autossh | |
| # DESCRIPTION: This is an SSH-D proxy with auto-reconnect on disconnect | |
| # AUTHOR: Hector Nguyen (hectornguyen at octopius dot com) | |
| # VERSION: 1.0.0 | |
| # ------------------------------------------------------------------------------ | |
| VERSION="1.0.0" | |
| GITHUB="https://github.com/hectornguyen/autossh" | |
| AUTHOR="Hector Nguyen" |
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 | |
| # exit when the command fails | |
| set -o errexit; | |
| # exit when try to use undeclared var | |
| set -o nounset; | |
| accessKeyToSearch=${1?"Usage: bash $0 AccessKeyId"} |
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
| #use libvirt | |
| ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt' | |
| VMCOUNT = (ENV['VMCOUNT'] || 1).to_i | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.require_version ">= 1.5.0" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| config.vm.box = "virtualbox" |
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
| #!/usr/bin/env bash | |
| #title : updateSonarProps.sh | |
| #description : | |
| # This script parses the project's name and version from its package.json and automagically | |
| # updates the version and package name in the SonarQube configuration properties file. | |
| # It can be used as a pre step before running the sonar-scanner command | |
| # It also creates a backup of the props file with suffix *.bak | |
| #prerequisites : NodeJS based project with package.json, sonar*.properties file in the cwd | |
| #author : Christian-André Giehl <christian@emailbrief.de> | |
| #date : 20180220 |
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
| # Install Vagrant and virsh command | |
| dnf install -y libvirt-client vagrant-hostmanager vagrant-libvirt | |
| # Allow to manage VMs via libvirt remotely (using TCP connection) | |
| cat >> /etc/libvirt/libvirtd.conf << EOF | |
| listen_tls = 0 | |
| listen_tcp = 1 | |
| listen_addr = "0.0.0.0" | |
| auth_tcp = "none" |