-
- basic steps
$ sudo apt update $ sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg \
- basic steps
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 sys | |
import functools | |
import statistics | |
lines = sys.stdin.readlines() | |
nOfLines = int(lines[0][:-1]) | |
nlist = [float(x) for x in lines[1].split()] |
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
# pre | |
yum -y install epel-release yum-plugin-priorities | |
# install tripleo repos | |
# This will pull the latest version RPM | |
PKG=$(curl https://trunk.rdoproject.org/centos7/current/ | grep python2-tripleo-repos- | awk -F'"' '{print $8}') | |
# This will install it | |
yum install -y https://trunk.rdoproject.org/centos7/current/${PKG} |
This file has been truncated, but you can view the full file.
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
INFO:tripleo_common.image.image_uploader:Running skopeo inspect docker://docker.io/tripleorocky/centos-binary-cron:current-tripleo | |
INFO:tripleo_common.image.image_uploader:Running skopeo inspect docker://docker.io/tripleorocky/centos-binary-glance-api:current-tripleo | |
INFO:tripleo_common.image.image_uploader:Running skopeo inspect docker://docker.io/tripleorocky/centos-binary-haproxy:current-tripleo | |
INFO:tripleo_common.image.image_uploader:Running skopeo inspect docker://docker.io/tripleorocky/centos-binary-heat-api-cfn:current-tripleo | |
INFO:tripleo_common.image.image_uploader:Running skopeo inspect docker://docker.io/tripleorocky/centos-binary-heat-engine:current-tripleo | |
INFO:tripleo_common.image.image_uploader:Running skopeo inspect docker://docker.io/tripleorocky/centos-binary-ironic-api:current-tripleo | |
INFO:tripleo_common.image.image_uploader:Running skopeo inspect docker://docker.io/tripleorocky/centos-binary-ironic-conductor:current-tripleo | |
INFO:tripleo_common.image.image_uploader:Running skopeo inspect d |
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
const mapopen = ['[', '{', '('] | |
const mapclosing = [']', '}', ')'] | |
function isValid(input) { | |
let openmatch, elem | |
let list = [] | |
for (let i = 0; i < input.length; i++) { | |
elem = input[i] | |
if (mapclosing.indexOf(elem) > -1) { | |
openmatch = mapopen[mapclosing.indexOf(elem)] |
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
var array = [10, 20, 20, 10, 10, 30, 50, 10, 20, 4, 20, 30, 500, 500, 500]; | |
const unique = (array) => array.filter((item, i, list) => list.indexOf(item) === i); | |
const countInArray = (array, what) => array.filter(item => item == what).length; | |
const keys = unique(arr) | |
let result = 0; | |
keys.map(key => { | |
var pair = Math.floor(countInArray(arr, key)/2); | |
if (pair > 0) { |
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
package main | |
import ( | |
"fmt" | |
"flag" | |
"os" | |
"log" | |
"os/signal" | |
"syscall" |
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
var zookeeper = require('node-zookeeper-client'); | |
var client = zookeeper.createClient(`${process.env.ZKPR_HOST || localhost}:${process.env.ZKPR_PORT || 2181}`); | |
client.once('connected', function () { | |
console.log('Connected to ZooKeeper.'); | |
// Create zNode | |
let zNode = `/zoo${Math.floor((Math.random() * 100000) + 1)}`; | |
client.create( |
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 | |
# @description: add this file to path /bin/ | |
# set_env_var variable_name variable value | |
VAR=$1 | |
VAL=$2 | |
set_env_v () { | |
echo 'export '$1'='$2 >> /home/$USER/.bashrc | |
} |
NewerOlder