{"id":16701277,"url":"https://github.com/saleyn/util","last_synced_at":"2025-07-01T06:35:31.968Z","repository":{"id":6597701,"uuid":"7840646","full_name":"saleyn/util","owner":"saleyn","description":"Erlang utility modules","archived":false,"fork":false,"pushed_at":"2024-08-04T15:13:06.000Z","size":821,"stargazers_count":45,"open_issues_count":0,"forks_count":11,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-06-09T11:49:39.342Z","etag":null,"topics":["erlang","parsetransform"],"latest_commit_sha":null,"homepage":"https://saleyn.github.io/util/","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saleyn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-01-26T17:01:00.000Z","updated_at":"2024-11-15T13:40:03.000Z","dependencies_parsed_at":"2023-02-15T17:15:29.421Z","dependency_job_id":"57e93155-0f1f-4fd2-ba96-c9bc2daa9761","html_url":"https://github.com/saleyn/util","commit_stats":{"total_commits":446,"total_committers":2,"mean_commits":223.0,"dds":0.2982062780269058,"last_synced_commit":"59f6a53bf18484894e5ff59512981e76b9047fe1"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/saleyn/util","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saleyn%2Futil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saleyn%2Futil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saleyn%2Futil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saleyn%2Futil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saleyn","download_url":"https://codeload.github.com/saleyn/util/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saleyn%2Futil/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262914214,"owners_count":23383846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["erlang","parsetransform"],"created_at":"2024-10-12T18:43:29.830Z","updated_at":"2025-07-01T06:35:31.950Z","avatar_url":"https://github.com/saleyn.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Erlang Utility Modules\n\n[![build](https://github.com/saleyn/util/actions/workflows/erlang.yml/badge.svg)](https://github.com/saleyn/util/actions/workflows/erlang.yml)\n\n**Author** Serge Aleynikov \u003cserge(at)gmail.com\u003e\n\n## Installation\n\n- Add dependency in `rebar.config`:\n```erlang\n{deps,\n [% ...\n  {util, \"~\u003e 1.0\"}\n ]}.\n```\n\n## Content\n\n| Module                    | Description                                                                          |\n| ------------------------- | ------------------------------------------------------------------------------------ |\n| decompiler                | decompiles modules and functions (useful for verifying accuracy of code generation)  |\n| csv                       | CSV parsing and loading data to MySQL                                                |\n| env                       | environment variables substitution, path normalization                               |\n| file_log_reader           | Periodically read an append-only log file and parse newly added data                 |\n| iif                       | Ternery if function including `iif/3`, `iif/4`, `ife/3`, `ife/4` parse transforms    |\n| io_lib_pretty_limited     | Print term to binary by constraining the output size                                 |\n| gin                       | Convenient parse transform for `in(Value, [A,B,C])` type of guards                   |\n| hex                       | Hex to bin conversion                                                                |\n| listx                     | Miscelaneous list handling functions                                                 |\n| osx                       | Execution of os commands with returned stdout and exit status                        |\n| pcap                      | reader/writer of packet capture files (tcpdump, wireshark)                           |\n| restrict_remsh_mod        | to be used for remote shells to restrict `q()`, `init:stop()`, `erlang:halt()`, etc. |\n| smtp                      | SMTP client supporting tcp and ssl protocols                                         |\n| sntp                      | simple SNTP client                                                                   |\n| str                       | stringification functions including `str/1` and `str/2` parse transforms             |\n| stringx                   | miscelaneous string functions                                                        |\n| throttle                  | implements a rate limitting algorithm                                                |\n| user_default              | extending shell with useful debugging and profiling commands                         |\n| build-aux/md-to-edoc.awk  | AWK script for converting `README.md` files to `overview.edoc`                       |\n\nAdditionally, the following Elixir modules are included:\n\n| Module       | File             | Description                                                                    |\n|--------------|------------------| -------------------------------------------------------------------------------|\n| CompileTime  | compile_time.ex  | Evaluate lambdas at compile time                                               |\n\n## Documentation\n\n* See [project documentation](https://saleyn.github.io/util)\n\nThis project implements an extension of `EDoc` documentation by using the color scheme similar\nto `GitHub`, and generate the `overview.edoc` from the `README.md`.\n\nIn order to use this feature, modify your `Makefile` to include:\n\n```\n-include build-aux/docs-addon.mk\n\nbuild-aux/docs-addon.mk:\n\t@echo \"Fetching build-aux/docs-addon.mk\" \u0026\u0026 \\\n\t\tmkdir -p build-aux \u0026\u0026 \\\n\t\tcurl -s -o build-aux/docs-addon.mk https://raw.githubusercontent.com/saleyn/util/master/build-aux/docs-addon.mk\n```\nAlso in your `rebar.config` add:\n```\n{edoc_opts, [{overview,        \"build-aux/overview.edoc\"},\n             {stylesheet_file, \"build-aux/edoc.css\"},\n             {title,           \"Project title used by rebar and also inserted as title to the index.html\"},\n             {keywords,        \"HTML meta keywords (comma-delimited) for search engine crawlers\"}, \n             ...]}.\n```\nNOTE: the `keywords` option is not specific to `EDoc` but used by the HTML reformatting make\nfile `docs-addon.mk`.\n\nThis will add the following targets to your `Makefile`:\n\n- `docs` - Make documentation from source code\n- `gh-pages` - Create GitHub pages for the current project\n- `get-version` - Show application release version from the `*.app.src` and `rebar.config`\n- `set-version` - Set the version number for the above `(make set-version version=X.Y.Z)`\n- `clean-docs`  - Remove the generated files in the `doc` directory\n\n## Elixir\n\nTo add functions from `user_default.erl` to Elixir's `iex` shell, add `~/.iex.exs` file\ncontaining:\n```\nimport :user_default\n```\n\n## Download\n\n* [GitHub](http://saleyn.github.io/util)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaleyn%2Futil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaleyn%2Futil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaleyn%2Futil/lists"}