Application.put_env(:sample, Sample.Repo, database: "oban_dev")
Application.put_env(:phoenix, :json_library, Jason)
Application.put_env(:sample, Sample.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 5001],
server: true,
This file contains 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
extends Node | |
# Based on this tweet by Clay John: | |
# https://twitter.com/john_clayjohn/status/1306447928932753408 | |
func _ready() -> void: | |
# Create a local rendering device. | |
var rd := RenderingServer.create_local_rendering_device() | |
This file contains 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 Company do | |
schema "companies" do | |
field(:name, :string) | |
field(:email, :string) | |
end | |
end | |
from(c in Company, where: c.name == "foo") | |
|> Repo.one() | |
|> (& &1.email).() |
This file contains 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
# To concat to lists, you normally do: | |
list = [1] | |
list ++ [2] | |
# result: [1, 2] | |
# How do you do that in pipelines? | |
# Global operators are under the Kernel module, so you can use them with the pipe operator. | |
list |> Kernel.++([2]) |
This file contains 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
- Download Erlang source from http://www.erlang.org/download.html | |
- tar zxvf otp_src_18.2.1.tar.gz | |
- Configure for 32 bits (wxe_driver.so won't be generated for 64-bits): | |
- CFLAGS=-O0 ./configure --disable-hipe --enable-smp-support --enable-threads --enable-kernel-poll | |
- ./otp_build autoconf | |
- ./configure && make && sudo make install | |
- which erl | |
- Install Elixir | |
- iex | |
- :observer.start should finally work |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>comment</key> | |
<string>Lua Syntax: version 0.8</string> | |
<key>fileTypes</key> | |
<array> | |
<string>lua</string> | |
</array> |
NewerOlder