mix

mix does not work behind proxy

喜夏-厌秋 提交于 2019-12-07 10:14:08
问题 I always have been using mix behind proxy at least just 2 weeks ago. However I found that mix becomes not to be able to work behind proxy yesterday. mix version is 1.1.1. mix local.hex runs. But mix deps.get occurs errors. $ mix deps.get Registry update failed (http_error) {:failed_connect, [{:to_address, {'s3.amazonaws.com', 443}}, {:inet, [:inet], :nxdomain}]} Running dependency resolution Dependency resolution completed successfully combine: v0.5.3 floki: v0.6.1 hackney: v1.3.2 httpoison:

How to read config files on elixir mix project

六月ゝ 毕业季﹏ 提交于 2019-12-07 02:07:37
问题 I am creating an elixir project to search for patterns in files. I want to store those patterns a config files to allow for easy changes in the app. My first idea is storing those files as exs files in the config folder in the mix project. So, the questions are: Is there any easy way to store the config in the files a a keyword list? How would I load it in the app? I see there are modules like File to read the file, but is there no standard way to parse keyword lists in elixir? I was thinking

How to get data from Ecto in a custom mix task

不想你离开。 提交于 2019-12-06 19:31:43
问题 I want to display data from my DB through Ecto in a custom mix task. How can I get the Ecto repo in my task (or start it)? I tried something like this but it didn't work: defmodule Mix.Tasks.Users.List do use Mix.Task use Mix.Config use Ecto.Repo, otp_app: :app @shortdoc "List active users" @moduledoc """ List active users """ def run(_) do import Ecto.Query, only: [from: 1] Mix.shell.info "=== Active users ===" query = from u in "users" sync = all(query) Enum.each(users, fn(s) -> IO.puts(u

How does division work in MIX?

≡放荡痞女 提交于 2019-12-06 03:23:23
问题 Can someone explain to me how division in MIX (from TAOCP by Knuth) works on a byte-to-byte basis? rA = |-| . . . .0| rX = |+|1235|0|3|1| The memory location 1000 contains |-|0|0|0|2|0| . When you execute the operation DIV 1000 the registers become rA = |+|0|617|?|?| rX = |-|0|0|0|?|1| Now I understand the signs on rA and rX , but in what order are the bytes of rAX filled and which divisions are done? If DIV 1000 leads to every bit divided by 2, then I would expect rAX = |+|617|0|1|0|-|0|1|0

How to read config files on elixir mix project

旧城冷巷雨未停 提交于 2019-12-05 09:00:31
I am creating an elixir project to search for patterns in files. I want to store those patterns a config files to allow for easy changes in the app. My first idea is storing those files as exs files in the config folder in the mix project. So, the questions are: Is there any easy way to store the config in the files a a keyword list? How would I load it in the app? I see there are modules like File to read the file, but is there no standard way to parse keyword lists in elixir? I was thinking something similar as the yml files in Rails. You can read keyword lists stored in a *.exs file, using

Laravel 5.4 Mix in c9.io ide

喜欢而已 提交于 2019-12-04 19:41:14
I've been trying to get Laravel Mix NodeJS compiling scripts to run in the c9 ide for hours now hopefully someone has a explanation or a fix. So basically I'm trying to compile my sass and a javascript file which both are default so there is no possibility of errors within the code. My webpack.mix.js is default and well and all I'm trying to do is run the npm command "npm run dev" which compiles the files without uglifying it and such. "npm run watch" which auto compiles every time you save and a change has been made does not work as well. Sorry for the terriable explanation but I'm just

installing JS packages using npm and compiling with webpack laravel mix

冷暖自知 提交于 2019-12-04 15:25:04
I am new to Laravel and following Laracast tutorials for Laravel 5.4 I read about Laravel mix and how we can compile our assets using Webpack Laravel Mix tool. So I tried adding a JavaScript Package 1- Installed AlertifyJS using npm . 2- Added require('alertifyjs') in resources\assets\js\bootstrap.js 3- Executed npm run dev . Assets were compiled to public\js\app.js , where I can see alertifyjs code by finding alertify keyword. I used alertify code like below in resources\assets\js\app.js : `$(document).ready(function(){ $('.run').on('click' , function(event){ alertify.alert("This is an alert

How does division work in MIX?

纵饮孤独 提交于 2019-12-04 07:38:57
Can someone explain to me how division in MIX (from TAOCP by Knuth) works on a byte-to-byte basis? rA = |-| . . . .0| rX = |+|1235|0|3|1| The memory location 1000 contains |-|0|0|0|2|0| . When you execute the operation DIV 1000 the registers become rA = |+|0|617|?|?| rX = |-|0|0|0|?|1| Now I understand the signs on rA and rX , but in what order are the bytes of rAX filled and which divisions are done? If DIV 1000 leads to every bit divided by 2, then I would expect rAX = |+|617|0|1|0|-|0|1|0|1|1| in which rA contains the division results and rX the remainders (filled from the right side). I'm

Elixir mix auto acknowledge

南楼画角 提交于 2019-12-04 02:56:58
I want to run tests of my Phoenix app on Travis-CI. Log excerpt: $ MIX_ENV=test mix do deps.get, compile, test Could not find hex, which is needed to build dependency :phoenix Shall I install hex? [Yn] When it comes to fetching and installing dependencies, it asks if it should install hex . I was wondering if I can pass a --yes option to mix so that it doesn't ask but just installs? As with any unix command, you could pipe yes into the mix command: yes | MIX_ENV=test mix do deps.get, compile, test You can add this command to your before_install section in .travis.yml mix local.hex --force

Make elixir app recompile and reload on source code change

ぐ巨炮叔叔 提交于 2019-12-03 09:32:58
How to automatically recompile and reload my iex + mix application every time I modify the source code? If there's no way for iex + mix combination to do that, what's the easiest alternative? I've checked phoenix's way to do reload, and it doesn't seems easy to implement for my small test project. I also know about José's .iex.exs : defmodule R do def reload! do Mix.Task.reenable "compile.elixir" Application.stop(Mix.Project.config[:app]) Mix.Task.run "compile.elixir" Application.start(Mix.Project.config[:app], :permanent) end end And I'm not extremely happy since it's not reloading