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:
require 'sinatra/base' | |
class Bacon < Sinatra::Base | |
enable :logging, :clean_trace | |
get '/' do | |
'Hello from Sinatra!' | |
end | |
end |
class ArelReport | |
# == MIXINS | |
extend ActiveModel::Callbacks | |
define_model_callbacks :optionals, :only => [:after, :before] | |
define_model_callbacks :query, :only => :before | |
# == CLASS | |
class << self | |
attr_accessor :projections, :default_table, :remove_zeros |
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 |
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 |
# 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? |
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 |
# 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: |
# 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 |
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: |
I hereby claim:
To claim this, I am signing this object: