Skip to content

Instantly share code, notes, and snippets.

View indygwyn's full-sized avatar

Thomas W. Holt Jr. indygwyn

  • Indianapolis, IN US
View GitHub Profile
@indygwyn
indygwyn / TrueColour.md
Created September 30, 2019 14:24 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
foreman-installer --scenario katello \
--no-enable-puppet \
--foreman-proxy-puppet false \
--foreman-proxy-puppetca false \
--foreman-proxy-content-puppet false \
--katello-enable-puppet false \
--enable-foreman-plugin-ansible \
--enable-foreman-plugin-digitalocean \
--enable-foreman-plugin-discovery \
--enable-foreman-plugin-remote-execution
add_newline = false
[character]
symbol = ""
error_symbol = "✖"
vicmd_symbol = ""
use_symbol_for_status = true
[cmd_duration]
min_time = 4
@indygwyn
indygwyn / custom-hiera.xml
Created September 4, 2019 15:40
Katello Customizations and Tuning
apache::mod::prefork::serverlimit: 1024
apache::mod::prefork::startservers: 10
apache::mod::passenger::passenger_max_pool_size: 64
apache::mod::passenger::passenger_max_request_queue_size: 800
postgresql::server::config_entries:
max_connections: 1000
shared_buffers: 2GB
work_mem: 8MB
checkpoint_segments: 32
autovacuum_vacuum_cost_limit: 2000
@indygwyn
indygwyn / README-setup-keycloak.md
Created August 25, 2019 23:07 — forked from drmalex07/README-setup-keycloak.md
Setup Keycloak. #keycloak

Setup Keycloak (5.0)

This is a checklist of steps to be taken to setup the identity server (in standalone mode). We assume that keycloak is installed under /usr/local/keycloak (so all paths will be relative to this).

1. Add module for PostgreSQL database

Under modules/org/postgresql/main we must place:

  • module.xml: descriptor for the module
  • postgresql-*.jar: the actual JAR for the PostgreSQL JDBC driver
@indygwyn
indygwyn / README-minimal-CA.md
Created August 25, 2019 23:05 — forked from drmalex07/README-minimal-CA.md
Setup a minimal certificate authority. #ca #minimal-ca #certificate #certificate-authority

Setup minimal Certificate Authority (CA)

1. Setup directory

Setup a directory to be used as the root of the certificate authority, e.g /home/user/documents/identity/ca.

First, create the root key/certificate pair root.{key,crt} that will be used to sign client requests. For example:

    openssl genrsa -out root.key 4096
@indygwyn
indygwyn / README-convert-properties-to-json-using-jq.md
Created August 25, 2019 23:04 — forked from drmalex07/README-convert-properties-to-json-using-jq.md
Convert properties to JSON using jq. #properties $json #jq

README

Say we have a properties file at foo.properties.

First, clean-up whitespace and empty lines, store in foo-1.properties:

cat foo.properties | \
    sed 's/[[:space:]]*=[[:space:]]*/=/' | \
    sed 's/[[:space:]]*$//' | \

sed '/^$/d' > foo-1.properties

@indygwyn
indygwyn / README-tomcat-as-systemd-service.md
Created August 25, 2019 23:01 — forked from drmalex07/README-tomcat-as-systemd-service.md
An example configuration for Tomcat as systemd service. #tomcat #systemd #systemd.service

README

Let Tomcat is download and installed under /opt/tomcat. Also, let tomcat be a non-provileged user under which the server will be running.

We assume that we keep server's binaries under /opt/tomcat and we will create a server instance named foo under /var/tomcat/ (carrying its own conf, logs, webapps, work, lib directories). See also https://dzone.com/articles/running-multiple-tomcat.

Create a template service unit file at /etc/systemd/system/tomcat@.service:

@indygwyn
indygwyn / grok_vi.mdown
Created August 20, 2019 16:39 — forked from nifl/grok_vi.mdown
Your problem with Vim is that you don't grok vi.

Answer by Jim Dennis on Stack Overflow question http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118

Your problem with Vim is that you don't grok vi.

You mention cutting with yy and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy is only one of many way to yank text into the anonymous copy buffer (or "register" as it's called in vi).

The "Zen" of vi is that you're speaking a language. The initial y is a verb. The statement yy is a simple statement which is, essentially, an abbreviation for 0 y$:

0 go to the beginning of this line. y yank from here (up to where?)

Verifying my Blockstack ID is secured with the address 17zTxpmihUFQtpcLNKZ7tM6hRh5vJpDjyH https://explorer.blockstack.org/address/17zTxpmihUFQtpcLNKZ7tM6hRh5vJpDjyH