This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[scholarship_app_development] STATEMENT: UPDATE applications SET updated_at = '2015-04-27 20:25:35 +0000' WHERE id = 455423 | |
[scholarship_app_development] LOG: process 97776 still waiting for ExclusiveLock on tuple (408,65) of relation 5436886 of database 5158717 after 1000.090 ms | |
[scholarship_app_development] STATEMENT: UPDATE applications SET updated_at = '2015-04-27 20:25:29 +0000' WHERE id = 455423 | |
[scholarship_app_development] LOG: process 96629 still waiting for ExclusiveLock on tuple (408,65) of relation 5436886 of database 5158717 after 1000.175 ms | |
[scholarship_app_development] STATEMENT: UPDATE applications SET updated_at = '2015-04-27 20:25:22 +0000' WHERE id = 455423 | |
[scholarship_app_development] LOG: process 97110 still waiting for ExclusiveLock on tuple (408,65) of relation 5436886 of database 5158717 after 1001.027 ms | |
[scholarship_app_development] STATEMENT: UPDATE applications SET updated_at = '2015-04-27 20:25:32 +0000' WHERE id = 455423 | |
[scholarship_app_development] LOG: process 96891 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Connecting to 10.1.13.242 | |
10.1.13.242 Installing Chef Client... | |
10.1.13.242 --2015-06-08 20:51:43-- https://www.opscode.com/chef/install.sh | |
10.1.13.242 Resolving www.opscode.com (www.opscode.com)... 184.106.28.91 | |
10.1.13.242 Connecting to www.opscode.com (www.opscode.com)|184.106.28.91|:443... connected. | |
10.1.13.242 HTTP request sent, awaiting response... 504 Gateway Time-out | |
10.1.13.242 2015-06-08 20:53:44 ERROR 504: Gateway Time-out. | |
10.1.13.242 | |
10.1.13.242 Starting first Chef Client run... | |
10.1.13.242 bash: line 88: chef-client: command not found |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install boost --c++11 | |
brew tap homebrew/science | |
brew install eigen flann hdf5 sundials gcc | |
cd /tmp | |
git clone https://bitbucket.org/mituq/muq | |
cd muq/MUQ/build | |
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/muq .. | |
make && make install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MacroFun do | |
defmacro a(str, do: block) do | |
quote do | |
res = [a: unquote(str)] | |
unquote(block) | |
res | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MacroFun do | |
defmacro a(str, do: block) do | |
quote do | |
{ :ok, var!(buffer, MacroFun) } = Agent.start_link fn -> [a: unquote(str)] end | |
unquote(block) | |
res = Agent.get var!(buffer, MacroFun), &(&1) | |
Agent.stop var!(buffer, MacroFun) | |
Enum.reverse res | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Foo do | |
defmacro foo(do: block) do | |
quote do | |
var!(foo, Foo) = "foo" | |
unquote(block) | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "benchmark" | |
def slow(list1, list2) | |
count = 0 | |
list1.each do |n| | |
count += 1 if list2.include?(n) | |
end | |
count | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############## | |
# Define DSL # | |
############## | |
defmodule Config.Dsl do | |
defmacro __using__(_) do | |
quote do | |
import unquote(__MODULE__) | |
@before_compile unquote(__MODULE__) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Definer do | |
defmacro define(do: block) do | |
quote bind_quoted: [block: Macro.escape(block)] do | |
func_name = @name |> String.to_atom |> Macro.var(__MODULE__) | |
def unquote(func_name) do | |
unquote(block) | |
end | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[88396] 2016/12/30 10:36:39.184894 [DBG] 127.0.0.1:49506 - cid:73 - Client connection created | |
[88396] 2016/12/30 10:36:39.185146 [TRC] 127.0.0.1:49506 - cid:73 - ->> [CONNECT {"version":"1.3","verbose":true,"protocol":1,"pedantic":false,"lang":"elixir"}] | |
[88396] 2016/12/30 10:36:39.185191 [TRC] 127.0.0.1:49506 - cid:73 - <<- [OK] | |
[88396] 2016/12/30 10:36:39.185439 [TRC] 127.0.0.1:49506 - cid:73 - ->> [SUB one_off.c4b487b4 c4b487b4] | |
[88396] 2016/12/30 10:36:39.185464 [TRC] 127.0.0.1:49506 - cid:73 - <<- [OK] | |
[88396] 2016/12/30 10:36:39.185622 [TRC] 127.0.0.1:49506 - cid:73 - ->> [UNSUB c4b487b4 1] | |
[88396] 2016/12/30 10:36:39.185634 [DBG] 127.0.0.1:49506 - cid:73 - Deferring actual UNSUB(one_off.c4b487b4): 1 max, 0 received | |
[88396] 2016/12/30 10:36:39.185640 [TRC] 127.0.0.1:49506 - cid:73 - <<- [OK] | |
[88396] 2016/12/30 10:36:39.185801 [TRC] 127.0.0.1:49506 - cid:73 - ->> [PUB _STAN.discover.test-cluster one_off.c4b487b4 28] | |
[88396] 2016/12/30 10:36:39.185812 [TRC] 127.0.0.1:49506 - cid:73 - ->> MSG_PAYLOAD: [ |