# (On Mac OSX) Start recording with your login shell.
# This ensures any aliases you've setup in .bash_profile are still available
cd ~/PhpStormProjects/asciinema/
python3 -m asciinema rec terminal.log -c "/bin/bash -l" -w5
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 | |
| # This script will help you setup Docker for TLS authentication. | |
| # Run it passing in the arguement for the FQDN of your docker server | |
| # | |
| # For example: | |
| # ./create-docker-tls.sh myhost.docker.com | |
| # | |
| # The script will also create a profile.d (if it exists) entry | |
| # which configures your docker client to use TLS | |
| # |
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
| resource "azure_hosted_service" "azure_test_nat" { | |
| name = "azure_test_nat" | |
| location = "North Europe" | |
| ephemeral_contents = false | |
| description = "Nat Gateway Hosted service created by Terraform." | |
| label = "azure_test_nat" | |
| } |
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 | |
| repofilebucket="$1" | |
| file=$2 | |
| echo "Filebucket repo: $1"; | |
| echo "File to restore: $2"; | |
| files=$(find $repofilebucket -iname "paths" | xargs -i ls {}) | |
| for i in $files |
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 | |
| repofilebucket="$1" | |
| file=$2 | |
| echo "Filebucket repo: $1"; | |
| echo "File to restore: $2"; | |
| files=$(find $repofilebucket -iname "paths" | xargs -i ls {}) | |
| for i in $files |
I have ssh connections from multiple users. I want to log all connectsion except those from the user 'git'. How dow you create an exception to a filter ?
input {
file {
path => "/var/log/auth.log"
type => "syslog"
}
}
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
| { | |
| "extractors": [ | |
| { | |
| "condition_type": "string", | |
| "condition_value": "sudo:", | |
| "converters": [], | |
| "cursor_strategy": "copy", | |
| "extractor_config": { | |
| "regex_value": "sudo:\\s+(\\S+)\\s+:" | |
| }, |
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
| import httplib | |
| import xml.dom.minidom | |
| HOST = "www.domain.nl" | |
| API_URL = "/api/url" | |
| def do_request(xml_location): | |
| """HTTP XML Post request""" | |
| request = open(xml_location, "r").read() |
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
| bash -c ' | |
| <%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%> | |
| if [ ! -f /usr/bin/chef-client ]; then | |
| apt-get update | |
| apt-get install -y ruby1.9.1 ruby1.9.1-dev build-essential wget | |
| cd /tmp | |
| wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://production.cf.rubygems.org/rubygems/rubygems-1.8.15.tgz | |
| tar zxf rubygems-1.8.15.tgz | |
| cd rubygems-1.8.15 |
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
| { | |
| "title": "VMware", | |
| "services": { | |
| "query": { | |
| "list": { | |
| "0": { | |
| "query": "*", | |
| "alias": "", | |
| "color": "#7EB26D", | |
| "id": 0, |