Skip to content

Instantly share code, notes, and snippets.

View mbarretta's full-sized avatar

Mike Barretta mbarretta

View GitHub Profile

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@mbarretta
mbarretta / abac-test.sh
Last active August 27, 2024 23:33
ABAC Test Scenario - Elastic X-Pack 6.1
#!/bin/bash
# NOTE: This script has a dependency on python for parsing
ES_URL=http://localhost:9200
ES_USER=elastic
ES_PASS=changeme
##################
@mbarretta
mbarretta / gist:f012f5e78ff71200e819ebfa0bddb544
Last active March 27, 2018 17:16
ineffective token_filter example: doc with two terms comes back in a terms_set query where only one term is supplied
PUT my_index
{
"mappings": {
"doc": {
"properties": {
"securityTags": {
"type": "keyword",
"fields": {
"length": {
"type": "token_count",
@mbarretta
mbarretta / gist:0feae006cab50c8011db75cf93c274bb
Last active April 2, 2018 14:39
attribute length via ingest node
# Create our mapping with a single attribute array: projects
PUT abac-ingest-node-test
{
"mappings": {
"doc": {
"properties": {
"projects": {
"type": "keyword"
}
}