Skip to content

Instantly share code, notes, and snippets.

View lusis's full-sized avatar

John E. Vincent lusis

View GitHub Profile
package fooservice
import (
"github.com/segmentio/ksuid"
idgen "github.com/lusis/foobar/idgen"
pb "github.com/lusis/foobar/pb"
storer "github.com/lusis/foobar/storer"
)
@lusis
lusis / myorg.proto
Created February 13, 2020 02:42
example.proto
syntax = "proto3"
package = "com.myorg.ptypes";
message User {
int64 id = 1;
UserStatus status = 2;
}
message Group {
int64 id = 1;
@lusis
lusis / README.md
Created April 10, 2019 16:19
exabgp promethues exporter

Current metrics at startup

root@node1:~# curl -s http://localhost:9569/metrics  | grep peer
# HELP peer_route_state shows the current peer state for a given route
# TYPE peer_route_state gauge
peer_route_state{family="ipv4 unicast",peer_asn="64496",peer_ip="192.168.1.2",route="192.168.88.2/32",self_asn="64496",self_ip="192.168.1.184"} 1
# HELP peer_state shows the current peer state
# TYPE peer_state gauge
peer_state{peer_asn="64496",peer_ip="192.168.1.2",self_asn="64496",self_ip="192.168.1.184"} 1
@lusis
lusis / test.py
Created January 10, 2018 04:45
test scripts for rundeck url script loading
print("hello from a python script")
@lusis
lusis / twopass_test.go
Created January 9, 2018 07:24
two-pass but it's only in testing
func TestSCMPluginForProjectResponseEnableImport(t *testing.T) {
obj := &SCMPluginForProjectResponse{}
// The test response file used here does NOT match the struct
data, dataErr := testdata.GetBytes(ListSCMPluginsResponseExportTestFile)
if dataErr != nil {
t.Fatalf(dataErr.Error())
}
placeholder := make(map[string]interface{})
_ = json.Unmarshal(data, &placeholder)
@lusis
lusis / t_test.go
Created January 9, 2018 06:00
fml golang json.Unmarshal
package main
import (
"encoding/json"
"testing"
"github.com/alecthomas/assert"
"github.com/davecgh/go-spew/spew"
)
---
operations:
default: 'read'
paths:
- '[^/debug/pprof/trace.*]': 'none'
debug:
default: 'none'
paths:
- '(^/reload|^/debug/pprof/.*)': 'write'
@lusis
lusis / artifactory.conf
Last active April 9, 2019 19:39
Artifactory Yum plugin (based on this s3 plugin - https://github.com/jbraeuer/yum-s3-plugin/blob/master/s3.py)
# place in /etc/yum/pluginconf.d/artifactory.conf
[main]
enabled=1
@lusis
lusis / cache_test.t
Created November 3, 2016 19:39
Test::Nginx to validate cache behaviour
use Test::Nginx::Socket 'no_plan';
no warnings;
no_diff;
#repeat_each(5);
run_tests();
__DATA__

Things I like

simple deployment

Initially getting started is very easy. Being a java based application, it ships with a nice embedded db that will meet most small usage scenarios very easily.

backup/recovery

Artifactory makes backups very easy to configure and restores are very straightforward. I've done several migrations from/to AWS and installs and it's worked very well.

dedupe