Skip to content

Instantly share code, notes, and snippets.

input {
file {
path => "/logs/my_service.log"
start_position => "beginning"
sincedb_path => "/dev/null"
codec => json
}
}
output {
receivers:
otlp:
protocols:
http:
endpoint: 0.0.0.0:4318
processors:
batch:
timeout: 1s
memory_limiter:
@boredstiff
boredstiff / gist:cca1a59c2afd3f3c154b63e17ed0b584
Created June 17, 2026 13:48
Elastic Stack Docker Compose
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:9.0.0
container_name: elasticsearch
environment:
- node.name=elasticsearch
- cluster.name=es-docker-cluster
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m -Djava.security.egd=file:/dev/./urandom"
@boredstiff
boredstiff / blah.md
Created September 29, 2021 02:51
Bitwig -> Arturia Microfreak Sync

On the Microfreak:

  • Press the Utility button
    • Go to Sync
      • Source: Auto
      • Clock: 24PPQ
      • Global Tempo: off
@boredstiff
boredstiff / blahhhh.py
Created February 26, 2019 20:57
sg_rest_question.py
sg.update('CustomNonProjectEntity02',
12345,
{'field_a': ['short', 'list'],
'field_b': ['different', 'list']
},
multi_entity_update_modes={
'field_a': 'set',
'field_b': 'add'
})
Step 16/17 : RUN cd /root/docs && cargo run -- database init
---> Running in cd87a7f3a657
Compiling cratesfyi v0.6.0 (/root/docs)
Finished dev [unoptimized + debuginfo] target(s) in 15.93s
Running `target/debug/cratesfyi database init`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error(Io(Os { code: 99, kind: AddrNotAvailable, message: "Cannot assign requested address" }))', src/libcore/result.rs:1009:5
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::_print
@boredstiff
boredstiff / view.py
Last active October 11, 2018 04:31
UI Movable data in MVC
import sys
from PySide2 import QtCore, QtWidgets, QtGui
class Node(QtGui.QStandardItem):
def __init__(self):
super(Node, self).__init__()
self.name = 'My name'
@boredstiff
boredstiff / get_time_slider_widget.py
Created August 24, 2018 19:00
Get the Time Slider Widget in Maya
from maya import mel
from PySide2 import QtWidgets
def get_widget(name):
"""Get the widget from the active QApplication that matches the given name.
Args:
name (str): The name of the widget to retrieve.
Returns:
"""
no Get the midpoint of the locators.
no Get a vector from that point to each locator, and to the camera.
no The mid-to-front vector dotted with mid to camera vector will be greater than 0
1.) Get the world position (MPoint) of the front and back locators
2.) Get the vector from back to front. This will be your Z vector for the matrix
3.) Cross this vector with the world up vector (world Y) to get your X vector
4.) Cross your X and Z vectors to get an orthogonal Y vector
5.) Build a matrix with these component vectors and the position of your camera
@boredstiff
boredstiff / reuse_options.py
Last active May 17, 2018 23:54
Click reusing options and chaining commands
"""This allows you to reuse options between commands and call one command to call two other commands.
So when 'create' is called, 'create_package' and 'create_repo' will be called and 'create_package' and 'create_repo'
can be called individually.
"""
import click
PACKAGE_NAME_KEY = __name__ + '.package_name'
REPO_NAME_KEY = __name__ + '.repo_name'