Full history for file:
git log --follow -p -- file_name
See repo commits in simpe UI orderd by date for specific branch:
gitk --full-history --date-order --branches master
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
# SSL configuration | |
# | |
listen 443 ssl default_server; |
def reverse_birthdays birthdays | |
result = {} | |
birthdays.map { |day,names| names.map { |name| result[name] = day } } | |
result | |
end | |
actual = {"2019-01-01"=>["karlo01", "karlo02"], "2019-01-02"=>["ben01", "ben02"]} | |
expected = {"karlo01"=>"2019-01-01", "karlo02"=>"2019-01-01", "ben01"=>"2019-01-02", "ben02"=>"2019-01-02"} | |
expected == reverse_birthdays(actual) |
sed -i -- 's/from tentamen\.tests\.models\./from tentamen\.tests\.database\.local\.models\./g' *.py |
Full history for file:
git log --follow -p -- file_name
See repo commits in simpe UI orderd by date for specific branch:
gitk --full-history --date-order --branches master
testers.each {|tester| print tester} |
defmodule FizzBuzz do | |
def up_to(n) when n > 0, do: 1..n |> Enum.map(&fizz_buzz/1) | |
def fizz_buzz(n) do | |
case {rem(n,3),rem(n,5),n} do | |
{0,0,_} -> FizzBuzz | |
{0,_,_} -> Fizz | |
{_,0,_} -> Buzz | |
{_,_,_} -> n | |
end | |
end |
defmodule Testivator.File do | |
@moduledoc """ | |
Arc.Ecto definition for charter data files upload | |
""" | |
use Arc.Definition | |
use Arc.Ecto.Definition | |
# Include ecto support (requires package arc_ecto installed): | |
# use Arc.Ecto.Definition |
defmodule Testivator.CRM.DataFile do | |
@moduledoc """ | |
DataFile schema | |
""" | |
use Testivator.Web, :model | |
use Arc.Ecto.Schema | |
alias Testivator.CRM.Charter | |
alias Testivator.CRM.DataFile | |
schema "datafiles" do |
defmodule Testivator.CRM.DatafileSpec do | |
@moduledoc """ | |
This module holds espec spec demonstrations for CRM.Datafile module. | |
""" | |
use ESpec.Phoenix, async: false, model: DataFile | |
alias Testivator.CRM.DataFile | |
alias Testivator.File | |
import Mock | |
context "Changeset" do |
def start(_type, _args) do | |
if Application.fetch_env!(:your_app_name, :production) do | |
PhoenixSwagger.Validator.parse_swagger_schema( | |
Path.join(["#{:code.priv_dir(:your_app_name)}", "static", "swagger.json"]) | |
) | |
else | |
PhoenixSwagger.Validator.parse_swagger_schema("priv/static/swagger.json") | |
end | |
// ... rest of your Phoenix Application start up code. |