Skip to content

Instantly share code, notes, and snippets.

View jharley's full-sized avatar
😷

Jason Harley jharley

😷
View GitHub Profile
@jharley
jharley / .gitignore
Last active June 2, 2022 21:13
Example Custom OpenTelemetry Collector Build
build
@jharley
jharley / fluent-bit.conf
Created November 2, 2021 20:53
fluent-bit to Honeycomb.io Events API
[INPUT]
Name dummy
[FILTER]
Name lua
Match *
script hny_event_filter.lua
call hny_format_filter
[OUTPUT]
import warnings
from datetime import datetime, timedelta, timezone
import pytest
from .unixdatetime import UnixDatetime
@pytest.mark.parametrize(
@jharley
jharley / Vagrantfile
Created January 2, 2021 21:20
Functional focal64 Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/focal64"
config.vm.network "private_network", type: "dhcp"
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
vb.customize ["modifyvm", :id, "--uart1", "0x3F8", "4"]
vb.customize ["modifyvm", :id, "--uartmode1", "file", File::NULL]
end
end
@jharley
jharley / .kitchen.yml
Last active February 12, 2017 18:23
This is a setup of test-kitchen for developing Ansible Galaxy roles on Ubuntu "Xenial" 16.04 using `kitchen-docker`, `kitchen-ansible`, and `kitchen-inspec` with support for systemd services in the container and roles provided via `requirements.yml` as git repos (via ssh)
---
driver:
name: docker
use_sudo: false
privileged: true
driver_config:
http_proxy: <%= ENV['KITCHEN_HTTP_PROXY'] %>
https_proxy: <%= ENV['KITCHEN_HTTPS_PROXY'] %>
transport:

Keybase proof

I hereby claim:

  • I am jharley on github.
  • I am jharley (https://keybase.io/jharley) on keybase.
  • I have a public key ASBNCz_X7gZqEJ-y3_LBrS3-kNC4pQcaOTvlumPbtBSUqwo

To claim this, I am signing this object:

@jharley
jharley / raw_to_guid.rb
Created July 23, 2016 18:04
Convert Oracle's RAW(16) type to a GUID w/Ruby 2
def is_guid?(guid)
standard_guid = /([A-F\d]{8})-([A-F\d]{4})-([A-F\d]{4})-([A-F\d]{4})-([A-F\d]{12})/i
(guid =~ standard_guid)
end
def to_byte_array(hex)
hex.unpack('H*').first.scan(/[A-F\d]{4}/i)
end
def format_guid(string)
@jharley
jharley / vagrant-berkshelf-3.0.1-vmware.patch
Created August 4, 2014 13:42
vagrant-berkshelf 3.0.1 provisioning patch
--- /Users/jharley/.vagrant.d/gems/gems/vagrant-berkshelf-3.0.1/lib/berkshelf/vagrant/action/install.rb.orig 2014-08-02 18:26:11.000000000 -0400
+++ /Users/jharley/.vagrant.d/gems/gems/vagrant-berkshelf-3.0.1/lib/berkshelf/vagrant/action/install.rb 2014-08-03 17:50:28.000000000 -0400
@@ -37,14 +37,20 @@
def vendor(env)
check_vagrant_version(env)
env[:berkshelf].ui.info "Updating Vagrant's berkshelf: '#{env[:berkshelf].shelf}'"
- FileUtils.rm_rf(env[:berkshelf].shelf)
+ real_shelf = env[:berkshelf].shelf
+ tmp_shelf = "#{real_shelf}-tmp"
+ FileUtils.mkdir_p(real_shelf)
@jharley
jharley / ceph-rest-api
Last active August 29, 2015 14:02
ceph REST API: upstart+uwsgi+nginx
# /etc/nginx/sites-available/ceph-rest-api
server {
listen 80;
server_name ceph-rest-api;
charset utf-8;
location / {
root /var/log/nginx;
error_log /var/log/nginx/ceph-restapi-error.log;
access_log /var/log/nginx/ceph-restapi-access.log combined;
@jharley
jharley / vagrant-berkshelf-2.0.1-vmware.patch
Last active March 8, 2020 19:24
vagrant-berkshelf 2.0.1 provisioning patch
--- /Users/jharley/.vagrant.d/gems/gems/vagrant-berkshelf-2.0.1/lib/berkshelf/vagrant/action/install.rb.orig 2014-05-02 11:02:44.000000000 -0400
+++ /Users/jharley/.vagrant.d/gems/gems/vagrant-berkshelf-2.0.1/lib/berkshelf/vagrant/action/install.rb 2014-05-03 10:36:35.000000000 -0400
@@ -42,9 +42,14 @@
def install(env)
check_vagrant_version(env)
env[:berkshelf].ui.info "Updating Vagrant's berkshelf: '#{env[:berkshelf].shelf}'"
- FileUtils.rm_rf(env[:berkshelf].shelf)
+ real_shelf = env[:berkshelf].shelf
+ tmp_shelf = "#{real_shelf}-tmp"
+