This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "../../styles/shared" | |
.access-info | |
display: flex | |
.access-info__input | |
flex: 1 | |
.access-info__icon | |
flex: 0 0 32px |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rspec" | |
RSpec.describe "before after" do | |
before do | |
raise "failed" | |
end | |
after do | |
puts "hey" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# == 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.swift | |
// Airport | |
// | |
// Created by Amos King on 3/22/16. | |
// Copyright © 2016 Binary Noggin. All rights reserved. | |
// | |
import UIKit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |