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 ruby | |
def countdown(n) | |
if n == 0 | |
1 | |
else | |
n*countdown(n-1) | |
end | |
end |
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 ruby | |
class Person | |
def greet(first, last) | |
puts "Hello, #{first} #{last}" | |
end | |
end | |
person = Person.new |
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 ruby | |
require 'open-uri' | |
require 'json' | |
open('http://api.wunderground.com/api/key/geolookup/conditions/q/WA/Seattle.json') do |f| | |
json_string = f.read | |
parsed_json = JSON.parse(json_string) | |
location = parsed_json['location']['city'] | |
temp_f = parsed_json['current_observation']['temp_f'] | |
print "Current temperature in #{location} is: #{temp_f}\n" |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCx4aP00AFH87vHDbkMMwVqFTEStdmmKQ+fHNW120FTs4ZxnqOd9yJ86WNAqycO66U+7faqYiTCMwg55tyyOyKptdv7KbHef+6HHKtaRFlge5tqmmbYUfzIFPNnY10oKJwoYkykot0XqQa7ySdwJhN6DwKXfKJbCx916WufTmmZSfA4tSLKVFJw7y/G1XT5ZmD+Fih+rCWDE6BGG1JUVuaPxsThthzuePKFn6FTuy6Du4Ztpu0DekCPO+FA9l9A+u4Bh1z5SyjU02XiLdQtquv5rY5TUVhK/iaTkwoUwmeIBA7N1MnUuJJZ6xQF8KjoUfK++GB70aBo2BPCoZTa9Oip root@hp-laptop |
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
ssh-rsa AAAAB4NzaC1yc2EAAAADAQABAAABAQC4fOC/LiPzEa3aTu8O+y91A0LhuF5yT/9PD6Xd3Dokoaa351t4mfg7mCbjifOTCl7s4NmGAK8HAvKxdtYiwFIQ80ibfT97cgK60ZRpqg//PCTMbvwuPOdyPx4J89leuzGBUGc9/IkHtfyW3hz6f1IBOX9tm48+6tQdqocGKh94T0HH0eSLx9QaPKZanVt9u22K7M9YAqomJ4IyU2XiMyBPRKgcelEkiWEvWz+w4lwhXJafPEnynO66L/ppMYwCRuII0+HRtEttrJ+jW0kEJRaOdMS4OZ6yFD8YuwjHN0qcv2pFVuDCW0XNepQ/JX60Rqr57CU5ARwIt13w+QfSYZfF valentin@valentin-vm |
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: get current elasticsearch version | |
uri: | |
url: http://localhost:9200 | |
method: GET | |
headers: | |
Content-Type: application/json | |
register: current_elasticsearch_version | |
- block: |
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
[{"email": "dcarnell5@theguardian.com", "first_name": "Derril", "ip_address": "19.110.56.145", "last_name": "Carnell", "badwith_in_bytes": 1988, "start_date": "2018-04-25 10:34:36", "end_date": "2018-04-11 02:53:45"}, {"email": "hmacdearmaid3@godaddy.com", "first_name": "Henry", "ip_address": "134.49.19.155", "last_name": "MacDearmaid", "badwith_in_bytes": 1568, "start_date": "2018-04-12 22:01:26", "end_date": "2018-04-15 02:47:32"}, {"email": "hfeldberger2@nationalgeographic.com", "first_name": "Hamnet", "ip_address": "26.236.251.95", "last_name": "Feldberger", "badwith_in_bytes": 9034, "start_date": "2018-04-24 04:18:15", "end_date": "2018-04-20 08:29:39"}, {"email": "hmemmory8@hhs.gov", "first_name": "Hildagarde", "ip_address": "217.28.205.150", "last_name": "Memmory", "badwith_in_bytes": 4494, "start_date": "2018-04-14 08:22:16", "end_date": "2018-04-24 10:37:18"}, {"email": "gborkin9@sciencedirect.com", "first_name": "Giraud", "ip_address": "144.19.199.53", "last_name": "Borkin", "badwith_in_bytes": 7693 |
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
--- | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: awx | |
annotations: | |
kubernetes.io/ingress.class: "nginx" | |
spec: | |
tls: | |
- hosts: |
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
--- | |
groups: | |
all: | |
vars: | |
eks_namespaces: | |
- awx | |
- ingress-nginx | |
k8s_secrets: | |
- apiVersion: v1 | |
kind: Secret |
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: use the venv python to ensure all dependencies are satisfied | |
set_fact: | |
ansible_python_interpreter: '{{ ansible_playbook_python }}' | |
- name: Create Namespaces | |
k8s: | |
kubeconfig: ~/.kube/config | |
state: present | |
definition: |