- Example: Brazil vs Belgiun
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
import { connect } from 'react-redux'; | |
import _ from 'lodash'; | |
export default function(...args) { | |
return function(ComponentClass) { | |
const mapStateToProps = !Array.isArray(args[0]) | |
? args[0] | |
: state => _.pick(state, args[0]); | |
return connect(mapStateToProps, mapDispatchToProps)(ComponentClass); | |
}; |
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
# install dependencies | |
apt-get install jq -y | |
# Set Variables | |
DOCKER_IMAGE=python:alpine | |
ENDPOINT=http://169.254.169.254/latest/meta-data/iam/security-credentials/ | |
KEYS=$(curl -s $ENDPOINT`curl -s $ENDPOINT`) | |
docker run -it --rm \ |
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 | |
screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty |
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 | |
pip install oauthlib | |
pip install https://github.com/samkuehn/bitbucket-backup/archive/master.zip |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
servers = [ | |
{ | |
:name => "k8s-head", | |
:type => "master", | |
:box => "ubuntu/xenial64", | |
:box_version => "20180831.0.0", | |
:eth1 => "192.168.205.10", |
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 | |
# Export EC2 to OVA and save OVA in S3 bucket s3://export-vms/ubuntus/18-04/*.ova | |
aws ec2 create-instance-export-task \ | |
--instance-id i-0c006d5b801050318 \ | |
--target-environment vmware \ | |
--export-to-s3-task DiskImageFormat=VMDK,ContainerFormat=ova,S3Bucket=export-vms,S3Prefix=ubuntus/18-04/ |
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 | |
# Usage: $0 java google.com 443 | |
CLIENT=$1 | |
HOST=$2 | |
PORT=$3 | |
# openssl s_client -servername $HOST -connect $HOST:$PORT </dev/null 2>/dev/null | openssl x509 -inform PEM -outform DER -out ${HOST}.cer |
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
View the file *http://files.example.com/user_list.yml* from *control1*. Create a playbook in */home/ansible/exam/users.yml* that follows the instructions provided in the file. | |
Create the file /home/ansible/exam/users.yml containing the following: | |
--- | |
- hosts: localhost | |
tasks: | |
- name: download user_list.yml | |
get_url: | |
url: http://files.example.com/user_list.yml |
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
--- | |
- hosts: localhost | |
tasks: | |
- name: download user_list.yml | |
get_url: | |
url: http://files.example.com/user_list.yml | |
dest: /home/ansible/files/user_list.yml | |
- hosts: node1 |