Skip to content

Instantly share code, notes, and snippets.

View olivermt's full-sized avatar

Oliver Severin Mulelid-Tynes olivermt

  • AMOI / OMT Tech AS
  • Hamar, Norway
  • 07:06 (UTC +02:00)
View GitHub Profile
room_name = case location do
"LANGUAGE=" <> rest ->
case rest do
#"en-US", "nb-NO" etc format
<<_x::bytes-size(2)>> <> "-" <<_x::bytes-size(2)>> <> ":" <> loc ->
loc
#"en", "zu" etc format
<<_x::bytes-size(2)>> <> ":" <> loc ->
loc
end
config :example, Example.Endpoint,
http: [port: 4000],
url: [host: "example.com", port: 443],
cache_static_manifest: "priv/static/manifest.json",
force_ssl: [rewrite_on: [:x_forwarded_proto]],
server: true
===> Compiling c:/Users/olivermt/Documents/code/prototyping/deps/iconv/c_src/iconv.c
===> Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23918 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
cl : Command line warning D9002 : ignoring unknown option '-g'
iconv.c
c:\program files\erl7.2.1\erts-7.2.1\include\erl_drv_nif.h(40): warning C4820: '<unnamed-tag>': '4' bytes padding added after data member 'dirty_scheduler_support'
c:\Program Files\erl7.2.1\erts-7.2.1\include\erl_nif.h(134): warning C4820: '<unnamed-tag>': '4' bytes padding added after data member 'arity'
c:\Program Files\erl7.2.1\erts-7.2.1\include\erl_nif.h(136): warning C4820: '<unnamed-tag>': '4' bytes padding added after data member 'flags'
c:\Program Files\erl7.2.1\erts-7.2.1\include\erl_nif.h(145): warning C4820: 'enif_entry_t': '4' bytes padding added after data member 'num_of_funcs'
C:\Users\olivermt\Documents\code\prototyping>mix compile
===> Expanded command sequence to be run: []
===> Expanded command sequence to be run: [{default,app_discovery},
{bare,compile}]
===> Evaluating config script "c:/Users/olivermt/Documents/code/prototyping/deps/p1_utils/rebar.config.script"
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace
===> Uncaught error: {badmatch,
{error,
{77,file,
{error,
#line 23 is the Poison encode
payload = %{
type: "email",
status: "open",
labels: ["Redacted" | issue.tags],
message: %{
subject: "Issue reported from client",
body: body(issue, user.name),
from: user.username,
to: "redacted@email.com",
test "logging in multiple times should give more client versions", %{conn: conn} do
conn = put_req_header(conn, "x-auth-token", authenticate("test2@test.com", "12345"))
admin_conn = put_req_header(conn, "x-auth-token", authenticate("admin@test.com", "admin"))
get conn, client_path(conn, :configuration), cversion: "5.222"
#swap over to admin to check that version count was updated sucessfully
admin_conn = get admin_conn, "/api/v1/company/2/user/2/client"
assert json_response(admin_conn, 200)["data"]["client"]["platform_version"] == 5
assert json_response(admin_conn, 200)["data"]["client"]["build_version"] == 222
end
Monicas-MacBook-Air:server oliver$ rebar3 -v
rebar 3.0.0-alpha-6 on Erlang/OTP 19 Erts 8.0.2
Monicas-MacBook-Air:server oliver$ which rebar3
/usr/local/bin/rebar3
Monicas-MacBook-Air:server oliver$ rebar3 bare
===> Command bare not found
Monicas-MacBook-Air:server oliver$ mix local.rebar
/Users/oliver/.mix/rebar already exists, overwrite? [Yn]
* creating /Users/oliver/.mix/rebar
/Users/oliver/.mix/rebar3 already exists, overwrite? [Yn]
mix local.rebar
17:31:40.541 [error] Failed updating session:
ProfileName: :httpc_mix
SessionId: {{'repo.hex.pm', 443}, #PID<0.119.0>}
Pos: 7
Value: 0
when
Session (db) info: :undefined
Session (db): {:session, {{'repo.hex.pm', 443}, #PID<0.119.0>}, false, :https,
defmodule Safari.Mixfile do
use Mix.Project
def project do
[app: :safari,
version: System.get_env("SAFARI_APP_VERSION") || "0.0.1",
elixir: "~> 1.0",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
build_embedded: Mix.env in [:prod, :staging],
MacBook-Pro-2:core oliver$ MIX_ENV=dev mix deps.get --verbosity=verbose
Running dependency resolution
** (Mix) Hex dependency resolution failed, relax the version requirements of your dependencies or unlock them (by using mix deps.update or mix deps.unlock)