Skip to content

Instantly share code, notes, and snippets.

View adkron's full-sized avatar

Amos King adkron

View GitHub Profile
@import "../../styles/shared"
.access-info
display: flex
.access-info__input
flex: 1
.access-info__icon
flex: 0 0 32px
defmodule Hoarder.PasswordResetTest do
use Hoarder.TestCase, async: true
alias Hoarder.PasswordReset
alias Hoarder.User
setup do
Ecto.Adapters.SQL.Sandbox.allow(Hoarder.Repo, self(), GenServer.whereis(PasswordResetHoard))
:ok
end
<address id="contact_info">
<h2 class="title">Contact Me</h2>
<dl class="info">
<dt>Company Site</dt>
<dd><a href="http://binarynoggin.com" title="Binary Noggin">Binary Noggin</a></dd>
<dt>Email</dt>
<dd><a href="mailto:[email protected]"
title="Email">[email protected]</a></dd>
<dt>Github</dt>
<dd><a href="http://github.com/BinaryNoggin" title="Github">BinaryNoggin</a></dd>
require "rspec"
RSpec.describe "before after" do
before do
raise "failed"
end
after do
puts "hey"
end
- if @changeset.action do
.alert.alert-danger
%p
Oops, something isn't quite right. Please correct the errors below.
= form_for @changeset, registration_path(@conn, :create), fn(f) ->
.form-group
= text_input f, :email, placeholder: "Name", class: "form-control"
= error_tag f, :email
.form-group
class PasswordFormatValidator < ActiveModel::EachValidator
def validate_each(record, attr_name, value)
PasswordValidationRules.new(value).errors.each do |error|
record.errors.add(attr_name, error)
end
#if value != record.password_confirmation
#record.errors.add(:password_confirmation, I18n.t('views.project.flash_messages.password_does_not_match_confirmation'))
#end
end
end
# == Schema Information
#
# Table name: cached_open_items
#
# id :integer not null, primary key
# company_id :integer not null
# project_id :integer
# login_information_id :integer not null
# open_item_id :integer not null
# open_item_type :string(255) not null
@adkron
adkron / ViewController.swift
Last active March 23, 2016 03:37
Estimate Nearable
//
// ViewController.swift
// Airport
//
// Created by Amos King on 3/22/16.
// Copyright © 2016 Binary Noggin. All rights reserved.
//
import UIKit
# From http://blog.boochtek.com/2015/02/23/hexagonal-rails-controllers
class OrderController < ApplicationController
def index
interactor.on(:display) { |orders| render orders }
interactor.list
end
def show
interactor.on(:display) { |order| render order }
class Reaction
def initialize(yield_to)
self.yield_to = yield_to
end
def method_missing(method_name, *)
if yieldable?(method_name)
yield if block_given?
end
end