I hereby claim:
- I am zacheryph on github.
- I am zacheryph (https://keybase.io/zacheryph) on keybase.
- I have a public key ASCDPgxfcWLiWhYVg09hdJi9QRrfK4ruGx8qLUluzsEdAQo
To claim this, I am signing this object:
| # just for this example to work | |
| class BigCommerce | |
| def woot(...) | |
| puts "woot" | |
| end | |
| class System | |
| def time(*args, **kwargs) | |
| puts "time: #{args} #{kwargs}" | |
| end |
| apiVersion: sources.triggermesh.io/v1alpha1 | |
| kind: SlackSource | |
| metadata: | |
| name: zro | |
| spec: | |
| appID: REDACTED | |
| signingSecret: | |
| value: REDACTED | |
| sink: | |
| ref: |
I hereby claim:
To claim this, I am signing this object:
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: {{ include "pkg.fullname" . }} | |
| labels: | |
| app: {{ include "pkg.name" . }} | |
| chart: {{ include "pkg.chart" . }} | |
| release: {{ .Release.Name }} | |
| heritage: {{ .Release.Service }} | |
| spec: |
| # Zachery Hostens | |
| # Ensure TPM Installation {{{ | |
| if "test ! -d ~/.tmux/plugins/tpm" \ | |
| "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm'" | |
| # }}} | |
| # General {{{ | |
| set -g prefix C-a | |
| set-option -g base-index 1 | |
| setw -g pane-base-index 1 |
| # this contains development overrides | |
| version: "3.5" | |
| # common for app/sidekiq | |
| # we volume bundler so we aren't constantly re-installing gems | |
| x-app: &app-common | |
| build: | |
| context: . | |
| target: dev | |
| volumes: |
| module Eventable | |
| module Emitter | |
| extend ActiveSupport::Concern | |
| included do | |
| def emit(event_name, payload = {}) | |
| full_event = "#{self.class.to_s.underscore}:#{event_name}" | |
| Eventable.emit full_event, self, payload | |
| end | |
| end |
| # Interactor pattern | |
| # idea pulled blatently from: https://github.com/collectiveidea/interactor | |
| # | |
| # NEED TO DO: | |
| # - add bluebird, so ALL perform() calls are promises. | |
| # - 'rollback' support to crawl 'backwards' when there is an error | |
| # - 'fail()' for the rollback | |
| # | |
| # Question: | |
| # - Is doing a pattern like this in JS useless? |
| class BucketSplit | |
| class InvalidSpread < StandardError ; end | |
| def initialize(total, splits, precision = 2) | |
| self.precision = precision | |
| self.total = total.round(precision) | |
| self.splits = splits | |
| self.buckets = calculate_buckets | |
| end |
| def account_tree(root, partial, output="") | |
| sorter = ->(n) {[n.content.index_path, n.content.number]} | |
| output += render(partial: partial, object: root.content) if root.content | |
| root.children.sort_by(&sorter).each {|node| output = account_tree(node, partial, output)} | |
| output.html_safe | |
| end |