Skip to content

Instantly share code, notes, and snippets.

View thebrianemory's full-sized avatar

Brian Emory thebrianemory

View GitHub Profile
@thebrianemory
thebrianemory / Bowl of Cereal: The ‘Hello World’ of Cooking.md
Last active July 10, 2016 00:57
Bowl of Cereal: The ‘Hello World’ of Cooking

Bowl of Cereal: The ‘Hello World’ of Cooking

For most people, the simple act of making a bowl of cereal is an easy one. These people can be placed in a stranger’s kitchen, and it will not be long before they will be sitting down to enjoy a nice bowl of Cookie Crisp. However, there are some people who have never had a bowl of cereal. If they are asked to make a bowl of cereal, they will return a blank stare. If that sounds like you, this is the guide to get you on your way.

1. Head to the kitchen

Most of the food preparation happens in the kitchen. Making a bowl of cereal is no different. All of the tools we need are in this tidy little room.

2. Grab your bowl and spoon

A bowl and a spoon are the first steps to enjoying your cereal. A bowl is the most popular dish to hold your cereal, but people have been known to use cups or Rubbermaid containers. All of them will get the job done, but we will focus on bowls. Now that we have our bowl and spoon, we have to make sure they are clean. It is not uncommo

use Mix.Config
... # Code removed for readability
# Configure your database
config :catcasts, Catcasts.Repo,
adapter: Ecto.Adapters.Postgres,
username: "thebrianemory", # change thebrianemory to the name of your home directory
password: "",
database: "catcasts_dev",
exports.config = {
... // Code removed for readability
npm: {
enabled: true,
globals: {
$: 'jquery',
jQuery: 'jquery',
}
<!DOCTYPE html>
<html lang="en">
... <!-- Code removed for readability -->
<script src="<%= static_path(@conn, "/js/app.js") %>"></script>
<!-- Add the below script -->
<script>
$(document).foundation();
@import "foundation";
@include foundation-everything;
exports.config = {
... // Code removed for readability
// Configure your plugins
plugins: {
babel: {
// Do not use ES6 compiler in vendor code
ignore: [/web\/static\/vendor/]
},
defmodule Catcasts.PageControllerTest do
use Catcasts.ConnCase
test "GET /", %{conn: conn} do
conn = get conn, "/"
assert html_response(conn, 200) =~ "Welcome to Catcasts!"
end
end
<div class="hero-section">
<div class="hero-section-text">
<h1>Welcome to Catcasts!</h1>
</div>
</div>
.hero-section {
background: linear-gradient(
rgba(0, 0, 0, 0.3),
rgba(0, 0, 0, 0.2)
), url('/images/cat.jpg') 50% no-repeat;
background-size: cover;
height: 80vh;
text-align: center;
display: -webkit-flex;
display: -ms-flexbox;
defmodule Catcasts.LayoutViewTest do
use Catcasts.ConnCase, async: true
test "Verify navbar is displayed", %{conn: conn} do
conn = get conn, "/"
assert html_response(conn, 200) =~ "<div class=\"top-bar\" id=\"my-menu\">"
end
end