Skip to content

Instantly share code, notes, and snippets.

View boris-42's full-sized avatar
:octocat:

Boris Pavlovic boris-42

:octocat:
View GitHub Profile
version: '2'
services:
web:
image: ansible/awx_web:latest
depends_on:
- rabbitmq
- memcached
- postgres
ports:
Identity added: /tmp/awx_95_lbYf3Y/credential_4 (/tmp/awx_95_lbYf3Y/credential_4)
ansible 2.5.3
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/var/lib/awx/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, Apr 11 2018, 07:36:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
Using /etc/ansible/ansible.cfg as config file
setting up inventory plugins
Parsed /tmp/awx_95_lbYf3Y/tmp9n_SoB inventory source with script plugin
---
- hosts: all
tasks:
- name: "Install gpg key"
become: yes
apt_key:
url: "https://download.sublimetext.com/sublimehq-pub.gpg"
state: "present"
- name: Add sublime apt repo
{
"deployment": {
"static": {
"clients": [{
"az": "test-az",
"dc": "test-dc",
"host": "127.0.0.1",
"ip": "127.0.0.1",
"port": 5001
}, {
class A(object):
def nchoc_bad(self, A, B):
myheap = []
for item in B:
heapq.heappush(myheap, -item)
#we have a heap containing all the numbers
class A(object):
def nchoc_bad(self, A, B):
myheap = []
for item in B:
heapq.heappush(myheap, -item)
#we have a heap containing all the numbers
@boris-42
boris-42 / gist:67f0d5ce3ffadd27170f
Created August 1, 2014 14:10
Multiple patches git & gerrit
# Some useful tips with gerrit:
# Work on your changes always in specific branch:
$ git checkout master
$ git checkout -b your_branch
# Rebasing your patches:
class Solution:
# @param A : list of integers
# @param B : integer
# @return an integer
def threeSumClosest(self, A, B):
A.sort()
if len(A) == 3:
return sum(A)
"ms_availability_west-2": {
"mappings": {
"service_availability": {
"properties": {
"name": {
"type": "keyword"
},
"region": {
"type": "keyword"
},
{"status_code": 200, "project_names": ["all", "openstack.keystone", "openstack.heat", "openstack.cinder", "openstack.glance", "openstack.neutron", "openstack.nova"], "projects": {"all": {"response_time_data": [["2016-11-11T12:00", 0.01966158591159102], ["2016-11-11T04:00", 0.029306551841700258], ["2016-11-11T08:00", 0.009598767567270745], ["2016-11-11T12:00", 0.02080416101962328], ["2016-11-11T04:00", null], ["2016-11-11T08:00", null], ["2016-11-12T12:00", 0.010563352369030731], ["2016-11-12T04:00", 0.010532431568329533], ["2016-11-12T08:00", 0.010604626643665445], ["2016-11-12T12:00", 0.009605689191569884], ["2016-11-12T04:00", null], ["2016-11-12T08:00", null], ["2016-11-13T12:00", 0.010339519584603194], ["2016-11-13T04:00", 0.015291179382863144], ["2016-11-13T08:00", 0.009361118342106541], ["2016-11-13T12:00", 0.009654672917289038], ["2016-11-13T04:00", null], ["2016-11-13T08:00", null], ["2016-11-14T12:00", 0.012262624605662293], ["2016-11-14T04:00", 0.018319304948090576], ["2016-11-14T08:00", 0.013894095