Skip to content

Instantly share code, notes, and snippets.

@vanetix
vanetix / application.ex
Created January 29, 2020 23:16
Broadway Demo
defmodule Migrator.Application do
@moduledoc false
use Application
def start(_type, _args) do
set_keyspace = fn conn ->
Xandra.execute!(conn, "USE affiliate_reporting")
end
defmodule Robot.SlackRouter do
use Slash
alias Slack.Command
alias Robot.Users
before :load_user
@doc """
Before handlers receive and return a `%Slash.Command{}`.
@vanetix
vanetix / BaseView.js
Created January 28, 2013 02:24
Backbone.js BaseView for garbage removal.
var BaseView = function(options) {
this.bindings = [];
this.views = [];
this.intervals = [];
Backbone.View.apply(this, [options]);
};
_.extend(BaseView.prototype, Backbone.View.prototype, {
/**