Skip to content

Instantly share code, notes, and snippets.

View risdenk's full-sized avatar

Kevin Risden risdenk

View GitHub Profile
@markrmiller
markrmiller / High level leader sync.rst
Last active October 11, 2021 19:33
High level leader sync

High level leader sync

Overseer yuck

  • This type of thing should not even be necessary here, but out of scope.
@m-radzikowski
m-radzikowski / script-template.sh
Last active May 4, 2024 04:13
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@dsmiley
dsmiley / buildbox.sh
Created May 19, 2020 15:38
buildbox similar to crave
#!/bin/sh
#
# Utility script to rsync and then open a shell or execute commands on a remote host.
# Tailored a little bit for Lucene/Solr
# @author David Smiley
# https://gist.github.com/dsmiley/daff3c978fe234b48a69a01b54ea9914
set -uex
REMOTEHOST=buildbox
REMOTEPATH="builds$PWD"

Solr on Kubernetes on local Mac

This tutorial shows how to setup Solr under Kubernetes on your local mac. The plan is as follows:

  1. Setup Docker for Mac with K8S
  2. Install an Ingress Controller to reach the cluster on localhost
  3. Install Solr Operator
  4. Start your Solr cluster
  5. Create a collection and index some docuemnts
  6. Scale from 3 to 5 nodes
@stettix
stettix / things-i-believe.md
Last active March 20, 2024 17:45
Things I believe

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette. See also my blog at www.janvsmachine.net.

Fundamentals

Keep it simple, stupid. You ain't gonna need it.

@asereda-gs
asereda-gs / CalciteOverheadTest.java
Last active January 30, 2022 01:35
CalciteOverheadTest
import org.apache.calcite.adapter.jdbc.JdbcSchema;
import org.apache.calcite.jdbc.CalciteConnection;
import org.apache.calcite.runtime.Hook;
import org.apache.calcite.schema.Schema;
import org.apache.calcite.schema.SchemaPlus;
import org.apache.commons.dbcp2.BasicDataSource;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
@lizthegrey
lizthegrey / attributes.rb
Last active February 24, 2024 14:11
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@smithje
smithje / docker-compose.yml
Created October 31, 2018 17:11
Solr cloud replication failure
version: '2'
services:
zoo-1:
image: zookeeper:3.4.13
restart: always
ports:
- "2181:2181"
environment:
ZOO_MY_ID: 1
ZOO_PORT: 2181
@F21
F21 / signing-gpg-keys.md
Last active May 5, 2024 20:59
Signing someone's GPG key

This is a quick guide of the commands we use to sign someone's GPG key in a virtual key signing party.

Note: The steps cover only the technical aspects of signing someone's key. Before signing someone's key, you must verify their identity. This is usually done by showing government-issued ID and confirming the key's fingerprint

The commands will work for both GPG and GPG2.

I use Julian's key for the examples. His key id is 2AD3FAE3. You should substitute with the appropriate key id when running the commands.

Signing the key

  1. List the keys currently in your keyring: gpg --list-keys.
@DavisVaughan
DavisVaughan / pyarrow-python-r.r
Last active April 28, 2018 17:01
Exploring Apache Arrow with pyarrow and reticulate
library(reticulate)
pa <- import("pyarrow", convert = FALSE)
# Create a list of pyarrow arrays
# this is our data, each array will become a column, but isn't quite one yet
# notice it doesn't even have a column name. they are kind of like vectors
data <- list(
pa$array(list(1,2,3,4)),
pa$array(list("foo", "bar", "baz", "hi")),
pa$array(list(TRUE, TRUE, FALSE, TRUE))