Time clock and the ordering of events in a distributed system
Consensus on Transaction Commit
An empirical study on the correctness of formally verified distributed systems
#!/usr/bin/env bash | |
create_backup_account() { | |
PROJECT_NAME=$1 | |
SERVICE_ACCOUNT_NAME=$2 | |
SERVICE_ACCOUNT=${SERVICE_ACCOUNT_NAME}@${PROJECT_NAME}.iam.gserviceaccount.com | |
gcloud iam service-accounts \ | |
create ${SERVICE_ACCOUNT_NAME} \ | |
--display-name "Backup service" |
{ | |
"email": "[email protected]", | |
"pass": "", | |
"client_id": "", | |
"client_secret": "", | |
"redirect_uri": "http://localhost:3000" | |
} |
defmodule App do | |
def split_case(value) do | |
# implementation in here | |
end | |
def run do | |
for _ <- 1..1_000_000 do | |
split_case("HelloWorld") | |
end | |
end |
defimpl Kipatest.Can, for: Kipatest.User do | |
use Kipatest.Web, :model | |
def can?(%User{} = subject, :owner, %User{} = user) do | |
user.id == subject.id | |
end | |
end |
defmodule Kipatest.AccessToken do | |
use Kipatest.Web, :model | |
@type t :: %{__struct__: atom} | |
@primary_key {:id, Ecto.UUID, autogenerate: true} | |
schema "access_tokens" do | |
field :is_valid, :boolean, default: true | |
field :refresh_token, Ecto.UUID, autogenerate: true | |
field :expired_at, Timex.Ecto.DateTime |
$ curl -H 'SOAPAction: ""' 'http://103.23.146.174:8080/WS_Epurse_Interface_proc_L/services/EpurseV2Interface?wsdl' -d ' | |
→ <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:int="http://Interface.epurseV2.vnptepay.vn"> | |
→ <soapenv:Header/> | |
→ <soapenv:Body>\ | |
→ <int:procService soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">\ | |
→ <JsonReq_str xsi:type="xsd:string">test\ | |
→ </JsonReq_str>\ | |
→ </int:procService>\ | |
→ </soapenv:Body>\ | |
→ </soapenv:Envelope>' |
defmodule FobiWithGuard do | |
def fibo(0), do: 1 | |
def fibo(1), do: 1 | |
def fibo(n) when n > 1, do: fibo(n - 1) + fibo(n - 2) | |
end |
<<a, b::size(3), rest::bitstring>> = <<1, 2, 3, 4, 5>> | |
# a => 1 | |
# b => 0 | |
# rest => <16, 24, 32, 5::size(5)>> |