Skip to content

Instantly share code, notes, and snippets.

View hortonew's full-sized avatar

Erik Horton hortonew

View GitHub Profile
@hortonew
hortonew / lib.rs
Last active February 15, 2025 19:55
bevy-breakout-0.15-lib.rs
// This example clones https://github.com/bevyengine/bevy/blob/latest/examples/games/breakout.rs
// with https://github.com/bevyengine/bevy/blob/latest/examples/games/stepping.rs
// into a single file, with modifications to be called from main.rs.
//! A 3d Scene with a button and playing sound.
use bevy::input::touch::{TouchInput, TouchPhase};
use bevy::math::bounding::{Aabb2d, BoundingCircle, BoundingVolume, IntersectsVolume};
use bevy::{
app::MainScheduleOrder,
@hortonew
hortonew / setup-bevy-0.15-project-for-android.sh
Last active March 20, 2025 22:28
setup-bevy-0.15-project-for-android.sh
#!/bin/zsh
# Grab PROJECT from Cargo.toml project.name
PROJECT=$(grep "name" Cargo.toml | cut -d '"' -f 2 | head -n 1)
PROJECT_ORG="bevyengine"
PROJECT_ORG_STRUCTURE="org.${PROJECT_ORG}.${PROJECT}"
BEVY_RELEASE="refs/heads/release-0.15.2"
echo "Creating new Bevy project: ${PROJECT} with organization structure: ${PROJECT_ORG_STRUCTURE}"
@hortonew
hortonew / glance.yml
Last active January 5, 2025 16:47
Glance
theme:
background-color: 225 14 15
primary-color: 157 47 65
contrast-multiplier: 1.1
branding:
custom-footer: |
<p><a href="https://github.com/hortonew">github.com/hortonew<a></p>
pages:
- name: Home
columns:
@hortonew
hortonew / update-home-assistant-docker.sh
Last active March 3, 2023 03:45
Home Assistant: Docker container update script
#!/bin/bash
# Note: This config renews letsencrypt certs for "mydomain.com". Modify this for your own domain or remove those steps.
set -e
# Update image
docker pull homeassistant/home-assistant:latest
d=`date +%Y-%m-%d-%H`
# Identify and stop old instance of home assistant
olddockerid=`docker ps -a | grep home-assistant | awk '{ print $1 }'`
@hortonew
hortonew / gist:ff778ff0dd10ef4df808373c3c3c41a0
Created September 26, 2018 01:56
Example krb5.conf to authenticate via kerberos from unix to windows
[libdefaults]
default_realm = CORPORATE.COMPANY.COM
krb4_config = /etc/krb.conf
krb4_realms = /etc/krb.realms
kdc_timesync = 1
ccache_type = 4
forwardable = true
proxiable = true
v4_instance_resolve = false
v4_name_convert = {
@hortonew
hortonew / Ansible vault with AWS Dynamic Inventory
Created September 17, 2018 20:34
Will allow you to set variables needed before dynamic inventory is run, allowing you to use ansible vault
---
- name: Set env variables
hosts: localhost
connection: local
environment:
AWS_ACCESS_KEY_ID: "{{ AWS_ACCESS_KEY }}"
AWS_SECRET_ACCESS_KEY: "{{ AWS_SECRET_KEY }}"
tasks:
- name: Build AWS Inventory
command: "{{ ec2_py_location }} --list --refresh-cache"
Example SHCluster Config
See doc for up to date configurations: http://docs.splunk.com/Documentation/Splunk/latest/DistSearch/SHCdeploymentoverview
Would recommend sharing splunk.secret on deployer and any search head part of cluster so you can maintain configs on deployer.
Splunk admin user: admin
Splunk admin password: my-splunk-admin-password
3 Search heads in cluster: searchhead-01, searchhead-02, searchhead-03
Search cluster secret: my-shc-secret
Search cluster label: my-shc-cluster-label
TODO
1. Pull date from source file name (fileName_23052018.log)
2. (DONE) Pull time from line entry
3. (DONE) Send to null queue -> "First line of every file"
4. (DONE) Send to null queue -> "Lines with -------------------------------"
props.conf
[Ayehu:EyeShare:Executor]
TRUNCATE=0
TIME_FORMAT=%X
[default]
homepath.maxDataSizeMB = 300000
coldPath.maxDataSizeMB = 200000
repFactor = auto
[volume:primary]
path = /opt/splunk/indexes/hot
maxVolumeDataSizeMB = 1500000
[volume:secondary]