Turns Ansible log outputs into plain JSON strings and sends them to an Elasticsearch cluster.
Place the script in your playbook's plugins/callbacks/ directory.
| # syntax=docker/dockerfile:1.7-labs | |
| ARG RUBY_VERSION | |
| ARG DISTRO_NAME=bullseye | |
| FROM ruby:$RUBY_VERSION-slim-$DISTRO_NAME AS base | |
| SHELL ["/bin/bash", "-c"] | |
| RUN echo "IRB.conf[:HISTORY_FILE] = ENV['IRB_HISTFILE']" >> ~/.irbrc |
| /* So how does this work? | |
| I'm using ANSI escape sequences to control the behavior of the terminal while | |
| cat is outputting the text. I deliberately place these control sequences inside | |
| comments so the C++ compiler doesn't try to treat them as code.*/ | |
| //[2K[2D[A[2K[A[2K[A[2K[A[2K[A | |
| /*The commands in the fake code comment move the cursor to the left edge and | |
| clear out the line, allowing the fake code to take the place of the real code. | |
| And this explanation uses similar commands to wipe itself out too. */ | |
| //[2K[2D[A[2K[A[2K[A[2K[A | |
| #include <cstdio> |
| package com.example.cacheabletest; | |
| import com.hazelcast.config.Config; | |
| import com.hazelcast.core.HazelcastInstance; | |
| import com.hazelcast.core.IMap; | |
| import java.time.Duration; | |
| import java.time.Instant; | |
| import java.util.ArrayList; | |
| import java.util.Comparator; | |
| import java.util.List; |
| #!/bin/bash | |
| #Vault password is 1 | |
| echo "Converting vault to yaml format:" | |
| ansible-vault decrypt --output - vault | python ./convert_vault.py > new-vault.yml | |
| echo "Decrypting a variable from the converted vault" | |
| ansible localhost -i localhost, -e @new-vault.yml -m debug -a 'var=secret' --ask-vault-pas |
| --- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md | |
| --- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192 | |
| -- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB. | |
| ------------ | |
| -- Basics -- | |
| ------------ | |
| -- Get indexes of tables |
| ### | |
| ### | |
| ### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
| ### https://christitus.com/windows-tool/ | |
| ### https://github.com/ChrisTitusTech/winutil | |
| ### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
| ### iwr -useb https://christitus.com/win | iex | |
| ### | |
| ### OR take a look at | |
| ### https://github.com/HotCakeX/Harden-Windows-Security |
| package com.nokia.nls.nmif; | |
| import io.netty.bootstrap.Bootstrap; | |
| import io.netty.buffer.ByteBuf; | |
| import io.netty.channel.Channel; | |
| import io.netty.channel.ChannelFuture; | |
| import io.netty.channel.ChannelFutureListener; | |
| import io.netty.channel.ChannelHandler; | |
| import io.netty.channel.ChannelHandlerContext; | |
| import io.netty.channel.ChannelInboundHandlerAdapter; |
| var app = angular.module('demo', ['ionic', 'ngCordova', 'demo.controllers', 'demo.services']); | |
| var controllers = angular.module('demo.controllers', []); | |
| var services = angular.module('demo.services', []); |
| { | |
| "directory": "bower_components" | |
| } |