gpg --list-keys
gpg --sign-key --ask-cert-level 0xXXXXXXXXX
%% Special thanks to Capflam | |
dbg:tracer(), dbg:p(all, call), dbg:tpl(mod, fun, dbg:fun2ms(fun(_) -> return_trace(), exception_trace() end)). |
set -e | |
for d in $(hdfs dfs -ls -R '/user/pnda/PNDA_datasets/datasets/source=*'|awk '/^d.*hour=..$/ {printf "%s ", $NF}'); do | |
IN=$(hdfs dfs -ls ${d}/*.avro | awk '{printf "%s ", $NF}') | |
OUT=${d}/compacted.avro.new | |
echo "--- In '$d' Compacting files '${IN}' to '${OUT}'" | |
hadoop jar /opt/cloudera/parcels/CDH/lib/avro/avro-tools.jar concat ${IN} ${OUT} | |
hdfs dfs -chown gobblin:pnda ${OUT} | |
hdfs dfs -rm -skipTrash ${d}/*.avro | |
hdfs dfs -mv ${OUT} ${d}/compacted.avro |
img_url="http://cloud-images.ubuntu.com/releases/xenial/release" | |
img_url="${img_url}/ubuntu-16.04-server-cloudimg-amd64-disk1.img" | |
wget $img_url -O disk.img.dist | |
cat > my-user-data <<EOF | |
#cloud-config | |
password: changeme | |
chpasswd: { expire: False } | |
ssh_pwauth: True |
sudo salt '*' pkg.mod_repo base enabled=1 name='CentOS-$releasever - Base' mirrorlist='http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os' gpgcheck=1 | |
sudo salt '*' pkg.mod_repo update enabled=1 name='CentOS-$releasever - Updates' mirrorlist='http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates' gpgcheck=1 | |
sudo salt '*' pkg.mod_repo epel enabled=1 name='Extra Packages for Enterprise Linux 7 - $basearch' mirrorlist='https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch' gpgcheck=1 | |
sudo salt '*' pkg.mod_repo epel-testing enabled=1 name='Extra Packages for Enterprise Linux 7 - Testing - $basearch' mirrorlist='https://mirrors.fedoraproject.org/metalink?repo=testing-epel7&arch=$basearch' gpgcheck=1 |
# From Vincent Bernat | |
# (-s0 not useful, just an habit) | |
ssh http://some.remote.host tcpdump -pni eth0 -s0 -w - -U port 8888 | wireshark -k -i - |
https://stedolan.github.io/jq/manual/ | |
https://stedolan.github.io/jq/tutorial/ | |
http://hyperpolyglot.org/json | |
http://andrew.gibiansky.com/blog/command-line/jq-primer/ | |
http://arjanvandergaag.nl/blog/wrestling-json-with-jq.html | |
http://programminghistorian.org/lessons/json-and-jq | |
http://kamicut.cc/2014/11/19/using-jq-nested-objects.html |
# ============LICENSE_START======================================================= | |
# org.onap.dcae | |
# ================================================================================ | |
# Copyright (c) 2018 Cisco Systems. All rights reserved. | |
# ================================================================================ | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
$vmlog = 'C:\Program Files\vmlogs\vmenv.log' | |
$getenv = "C:\Program Files\VMware\VMware Tools\vmtoolsd.exe" --cmd="info-get guestinfo.ovfEnv" > "C:\Program Files\vmlogs\vmenv.xml" | |
Invoke-Expression -Command $getenv | |
[xml]$vmenv = Get-Content $vmenvxml | |
$vmIP = $vmenv.Environment.PropertySection.Property | ?{ $_.key -like 'ip_address' } | select -expand value | |
$vmNetmask = $vmenv.Environment.PropertySection.Property | ?{ $_.key -like 'netmask' } | select -expand value | |
$vmGW = $vmenv.Environment.PropertySection.Property | ?{ $_.key -like 'default_ateway' } | select -expand value |
SOURCEDIR = diags | |
BUILDDIR = png | |
BLOCKDIAG_SOURCES = $(wildcard $(SOURCEDIR)/*.blockdiag) | |
SEQDIAG_SOURCES = $(wildcard $(SOURCEDIR)/*.seqdiag) | |
ACTDIAG_SOURCES = $(wildcard $(SOURCEDIR)/*.actdiag) | |
NWDIAG_SOURCES = $(wildcard $(SOURCEDIR)/*.nwdiag) | |
BLOCKDIAG_GENERATED = $(patsubst $(SOURCEDIR)/%.blockdiag, $(BUILDDIR)/%.png, $(BLOCKDIAG_SOURCES)) | |
SEQDIAG_GENERATED = $(patsubst $(SOURCEDIR)/%.seqdiag, $(BUILDDIR)/%.png, $(SEQDIAG_SOURCES)) |