Author: Robert Virding (Co-inventor of Erlang)
Slides: pdf
Video: youtube
| #!/usr/bin/escript | |
| %% -*- mode: erlang -*- | |
| main(Files) -> | |
| NumWorkers = 3, | |
| Parent = self(), | |
| Workers = [spawn_link(fun() -> worker(Parent) end) || _ <- lists:seq(1, NumWorkers)], |
| .projects_stories_page .storyLabels a[title="blocked"] { | |
| background-color: red; | |
| color: white !important; | |
| padding: 0 3px; | |
| display: inline-block; | |
| } |
| child(SupPid, Child) -> | |
| find_child( | |
| Child, | |
| supervisor:which_children(SupPid) | |
| ). | |
| find_child(_, []) -> | |
| {error, not_found}; |
Create the mongod.conf and insert the config content.
sudo vim /usr/local/var/mongodb/mongod.conf
Grab the path to mongod. which mongod
Create the org.mongo.mongod.plist file and insert the plist content and update the path to mongod.
| lists:sort(fun({_, X}, {_, Y}) -> X > Y end, | |
| dict:to_list(lists:foldl( | |
| fun(Pid, Dict) -> | |
| InitialCall = case erlang:process_info(Pid, initial_call) of | |
| {initial_call,{proc_lib,init_p,A}} -> | |
| case erlang:process_info(Pid, dictionary) of | |
| {dictionary, D} -> proplists:get_value('$initial_call', D, undefined); | |
| _ -> {proc_lib,init_p,A} | |
| end; | |
| {initial_call,{erlang,apply,A}} -> |
| " Put this in your .vimrc and whenever you `git commit` you'll see the diff of your commit next to your commit message. | |
| " For the most accurate diffs, use `git config --global commit.verbose true` | |
| " BufRead seems more appropriate here but for some reason the final `wincmd p` doesn't work if we do that. | |
| autocmd VimEnter COMMIT_EDITMSG call OpenCommitMessageDiff() | |
| function OpenCommitMessageDiff() | |
| " Save the contents of the z register | |
| let old_z = getreg("z") | |
| let old_z_type = getregtype("z") |
React Native is great product but lacks for stable, intuitive and easy navigation API during many years. Every year we see new, better API: Native Navigator, ex-Navigator, NavigationExperimental, ex-Navigation, wix native navigation, airbnb native navigation, ReactNavigation...
Once I've started React Native development, in 2015, I created RNRF - simple API for easy navigation. It was clear that better navigation instruments will come later but I didn't want to change my code again and again to switch for better API. Every new major version of RNRF is based on different navigation framework and mostly preserves own API.
Another goal was to represent all navigation flow within one place in clear, human-readable way - similar to iOS Storyboards concept. This way other engineers could understand your app flow faster.
| defmodule Context do | |
| @moduledoc false | |
| defmacro __using__(opts) do | |
| repo = Keyword.fetch!(opts, :repo) | |
| quote do | |
| import Context, only: [context: 1, context: 2] | |
| Module.put_attribute(__MODULE__, :__repo__, unquote(repo)) |