Skip to content

Instantly share code, notes, and snippets.

View nietaki's full-sized avatar
😌
purposeful

Jacek Królikowski nietaki

😌
purposeful
View GitHub Profile
@nietaki
nietaki / ecto_iex_helpers.ex
Created September 18, 2023 18:30 — forked from pyzlnar/ecto_iex_helpers.ex
A few Ecto helpers that you might want to add to your .iex.exs file. Were created with PSQL in mind
import_if_available(Ecto.Query)
# alias MyApp.Repo
defmodule R do
# Old habits die hard. Take a random of something. You don't care which.
# > R.take(SomeSchema)
def take(schema_or_query) do
schema_or_query
|> limit(1)
|> Repo.one()
@nietaki
nietaki / rebar-reltool-relase-notes.md
Created January 30, 2016 16:23 — forked from ToddG/rebar-reltool-relase-notes.md
using rebar to create an erlang app with a dependency, and then starting a release created with reltool

Summary

I'm trying to figure out how to use rebar to:

  • create erlang project
  • add a dependency on an erlang module from github
  • start the app via the erl console
  • create a release and start the app from the release (via the generated scripts)
#AppStore: Install XCode
#install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew update
curl https://gist.githubusercontent.com/pyetras/4b59e1902cfaf9af3c98/raw/Caskfile > Caskfile
curl https://gist.githubusercontent.com/pyetras/4b59e1902cfaf9af3c98/raw/Brewfile > Brewfile
/opt/cuda-5.0.35/lib64:
/opt/XLE/lib:
/lib:
/lib64:
/usr/lib:
/usr/lib64:
jk292749@students:/lib$ find /usr/lib64 -iname "*boost*" 2>/dev/null
/usr/lib64/libboost_date_time.so
/usr/lib64/libboost_filesystem.so