Magic words:
psql -U postgresIf run with -E flag, it will describe the underlaying queries of the \ commands (cool for learning!).
Most \d commands support additional param of __schema__.name__ and accept wildcards like *.*
| defmodule TodoList.Repo.Migrations.CreateTasks do | |
| use Ecto.Migration | |
| def change do | |
| create table("tasks") do | |
| add :task_name, :string | |
| add :task_description, :string | |
| add :task_status, :string | |
| timestamps() | |
| end |
| defmodule TodoList.Task do | |
| use Ecto.Schema | |
| import Poison | |
| alias TodoList.Repo | |
| schema "tasks" do | |
| field :task_name | |
| field :task_description | |
| field :task_status |
| use Mix.Config | |
| config :todolist, TodoList.Repo, [ | |
| adapter: Ecto.Adapters.Postgres, | |
| database: "todolist_#{Mix.env}", | |
| username: "postgres", | |
| password: "", | |
| hostname: "localhost", | |
| ] |
| defmodule StillOn do | |
| import IO | |
| def yeah do | |
| puts "I am Still on it" | |
| end | |
| end |
| " ---------------------- USABILITY CONFIGURATION ---------------------- | |
| " Basic and pretty much needed settings to provide a solid base for | |
| " source code editting | |
| " don't make vim compatible with vi | |
| set nocompatible | |
| " turn on syntax highlighting | |
| syntax on | |
| " and show line numbers |
| <?php | |
| namespace App\Http\Controllers\Api\V1; | |
| use Illuminate\Http\Request; | |
| use App\Http\Requests; | |
| use App\Http\Controllers\Controller; | |
| use Psy\Util\Json; |
| <?php | |
| use Maatwebsite\Excel\Excel; | |
| use Carbon\Carbon; | |
| use App\Model\BokkingsModel; | |
| class SomeController extends Controller{ | |
| /** | |
| * Export to Excel data sheet | |
| * |
| # Testing the response | |
| test "should get the home index" do | |
| assert_routing 'admin/home' , {controller: 'admin/home/home' , action: 'index' } | |
| assert_response :success | |
| end | |
| test "should go into the home index with okay response" do | |
| get :index | |
| assert_response :success | |
| end |