Skip to content

Instantly share code, notes, and snippets.

defmodule MediumPhxExample.Audio do
@moduledoc """
The boundary for the Audio system.
"""
import Ecto.{Query, Changeset}, warn: false
alias MediumPhxExample.Repo
alias MediumPhxExample.Audio.Album
defmodule MediumPhxExample.Audio.Song do
use Ecto.Schema
schema "audio_songs" do
field :duration, :integer
field :name, :string
field :album_id, :id
timestamps()
end
defmodule MediumPhxExample.Audio.Album do
use Ecto.Schema
schema "audio_albums" do
field :name, :string
field :release, :utc_datetime
timestamps()
end
end
defmodule MediumPhxExample.Web do
def controller do
quote do
use Phoenix.Controller, namespace: MediumPhxExample.Web
import Plug.Conn
# Before 1.3 it was just:
# import MediumPhxExample.Router.Helpers
import MediumPhxExample.Web.Router.Helpers
import MediumPhxExample.Web.Gettext
end
<!DOCTYPE html>
<html lang="en" >
<head>
<title>
Constance | Django site admin</title>
<link rel="stylesheet" type="text/css" href="/static/admin/css/base.css" />
option "with-blk-sha1", "Compile with the block-optimized SHA1 implementation"
option "without-completions", "Disable bash/zsh completions from 'contrib' directory"
option "with-brewed-openssl", "Build with Homebrew OpenSSL instead of the system version"
option "with-brewed-curl", "Use Homebrew's version of cURL library"
option "with-brewed-svn", "Use Homebrew's version of SVN"
option "with-persistent-https", "Build git-remote-persistent-https from 'contrib' directory"
test do
(testpath/".zshrc").write "source `brew --prefix`/share/antigen.zsh"
system "/bin/zsh", "--login", "-i", "-c", "antigen help"
end
bottle do
root_url "https://example.com"
prefix "/opt/homebrew"
cellar "/opt/homebrew/Cellar"
revision 4
sha256 "4921af80137af9cc3d38fd17c9120da882448a090b0a8a3a19af3199b415bfca" => :yosemite
sha256 "c71db15326ee9196cd98602e38d0b7fb2b818cdd48eede4ee8eb827d809e09ba" => :mavericks
sha256 "85cc828a96735bdafcf29eb6291ca91bac846579bcef7308536e0c875d6c81d7" => :mountain_lion
end
# Documentation: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md
# http://www.rubydoc.info/github/Homebrew/homebrew/master/Formula
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class GitSecret < Formula
desc ""
homepage ""
url "https://github.com/sobolevn/git-secret/archive/v0.1.0.tar.gz"
version "0.1.0"
sha256 "107c5555c203ad3b1498e2995fa8aa81942840189316d13933fcf0947180d10b"
@sobolevn
sobolevn / medium-django-split-settings.py
Last active April 4, 2017 07:22
medium-django-split-settings.py
"""
This is a django-split-settings main file.
For more information read this:
https://github.com/sobolevn/django-split-settings
Default environment is `developement`.
To change settings file:
`DJANGO_ENV=production python manage.py runserver`
"""