Skip to content

Instantly share code, notes, and snippets.

Avatar

Boris Pavlovic boris-42

View GitHub Profile
View var lib awx docker-compose.yml
version: '2'
services:
web:
image: ansible/awx_web:latest
depends_on:
- rabbitmq
- memcached
- postgres
ports:
View ansible (add hoc)
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
View ansible packages
---
- 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
View gist:ffd15f5000dffa37537604e363fd9930
{
"deployment": {
"static": {
"clients": [{
"az": "test-az",
"dc": "test-dc",
"host": "127.0.0.1",
"ip": "127.0.0.1",
"port": 5001
}, {
View somestuff
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
View somestuff
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
View 3-sum
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)
View gist:2d11af6aec930dc78578312fcae8a90d
"ms_availability_west-2": {
"mappings": {
"service_availability": {
"properties": {
"name": {
"type": "keyword"
},
"region": {
"type": "keyword"
},
View resutls
{"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
View notworking
ERROR in ./~/css-loader!./~/postcss-loader!./~/less-loader!./~/extract-text-webpack-plugin/loader.js?{"omit":1,"extract":true,"remove":true}!./~/style-loader!./~/css-loader!./~/postcss-loader!./~/less-loader!./src/styles/loading.less
Module build failed: ModuleBuildError: Module build failed: ReferenceError: Promise is not defined
at Object.module.exports (/home/ubuntu/fuel-devops-portal/node_modules/postcss-loader/index.js:51:5)
at DependenciesBlock.onModuleBuildFailed (/home/ubuntu/fuel-devops-portal/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:315:19)
at nextLoader (/home/ubuntu/fuel-devops-portal/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:270:31)
at /home/ubuntu/fuel-devops-portal/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:292:15
at runSyncOrAsync (/home/ubuntu/fuel-devops-portal/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:173:4)
at nextLoader (/home/ubuntu/fuel-devops-p