├── .gitignore ├── content ├── notes │ └── .gitkeep ├── search │ └── _index.md └── about.md ├── static └── ox-hugo │ └── .gitkeep ├── CNAME ├── default.el ├── archetypes └── default.md ├── notes ├── docs │ └── ethereum-yellow-paper.pdf ├── 20210104214258-post_ideas.org ├── 20210103172008-setting_shortcuts_for_mac_os.org ├── 20210102165851-emacs_env_for_elixir.org ├── 20210830185320-blockscout.org ├── 20210901185649-donations.org ├── 20210831202518-cargo_mode.org ├── 20210112095428-rudeness.org ├── 20210831155211-hornet.org ├── 20210831213924-roam_research.org ├── 20220116173133-expbkdf2.org ├── 20210515123015-terminal_productivity.org ├── 20210831202235-mix_el.org ├── 20210110202229-postgres_in_alpine.org ├── 20210831151627-exabi.org ├── 20211114125003-wireguard.org ├── 20210903214328-taskwarrior.org ├── 20210901190330-my_emacs_projects.org ├── 20210923090141-customzing_agenda_view.org ├── 20210924144452-diff_with_magit.org ├── 20210831143205-exrlp.org ├── 20210903215852-open_source_project_ideas.org ├── 20210831154424-ethereum_virual_machine.org ├── 20210831150523-ethereum_yellow_paper.org ├── 20210830183352-frankenstein.org ├── 20210831153203-exsecp256k1.org ├── 20210303223032-amethyst.org ├── 20210831153758-bn.org ├── 20210910163603-line_wrapping_in_compilation_mode_buffers.org ├── 20210831083052-cronenberg.org ├── 20210831232850-company_mode_for_elixir.org ├── 20210910163949-emacs_tweaks.org ├── 20210902194855-ethereumex.org ├── 20210303215232-metal_on_mac_os.org ├── 20210606075727-git_submodules.org ├── 20210906224050-hd_wallets_for_elixir.org ├── 20210107220015-learning_rust.org ├── 20210917215257-emacs_and_free_time.org ├── 20210901184335-my_resources_and_social_links.org ├── 20210903214239-cool_terminal_apps.org ├── 20210919165400-schedule_recurring_org_mode_events_on_week_days.org ├── 20211002164043-subdomain_with_underscores_on_github_pages.org ├── 20210831213556-org_roam.org ├── 20210902211035-accessing_site_variables_in_hugo_render_hooks.org ├── 20210901184457-my_blog.org ├── 20210831195358-org_mode.org ├── 20210903220033-org_mode_parser.org ├── 20220116172302-cryptopunk.org ├── 20210830182841-fang.org ├── 20210918145412-enable_loopback_mode_for_pinentry.org ├── 20210830184907-mana.org ├── 20210101224257-learn_org_roam.org ├── 20210831214301-zettelkasten.org ├── 20210831195739-change_displayed_style_of_org_links.org ├── 20210313110026-setting_up_gpg_on_mac_os.org ├── 20210901191515-life_balance.org ├── 20210107221817-emacs.org ├── 20210918135953-tmux.org ├── 20210831225847-my_braindump.org ├── 20210920174351-track_database_changes_with_ecto_and_structure_sql.org ├── 20211103175405-nomad.org ├── 20220625105915-networking_notes.org ├── 20210109164238-el_monitorro.org ├── 20210830181701-my_projects.org └── 20210830224139-rust.org ├── .gitmodules ├── config.toml ├── Makefile ├── README.md ├── .github └── workflows │ └── gh-pages.yml └── init.el /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /content/notes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/ox-hugo/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | braindump.badykov.com -------------------------------------------------------------------------------- /content/search/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Search me! 3 | --- 4 | -------------------------------------------------------------------------------- /default.el: -------------------------------------------------------------------------------- 1 | (("ox-hugo" . "549cc20b5532948608e849c2865823b8612f72a2")) 2 | :beta 3 | -------------------------------------------------------------------------------- /archetypes/default.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | date: {{ .Date }} 4 | draft: true 5 | --- 6 | -------------------------------------------------------------------------------- /notes/docs/ethereum-yellow-paper.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayrat555/braindump/HEAD/notes/docs/ethereum-yellow-paper.pdf -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | 2 | [submodule "themes/cortex-dark"] 3 | path = themes/cortex-dark 4 | url = https://github.com/ayrat555/cortex-dark 5 | -------------------------------------------------------------------------------- /notes/20210104214258-post_ideas.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 45598DF5-ED73-446A-8207-ADC489BAFEDA 3 | :END: 4 | #+title: Post ideas 5 | #+filetags: :post:blog_post_idea: 6 | 7 | All posts are written :] 8 | -------------------------------------------------------------------------------- /notes/20210103172008-setting_shortcuts_for_mac_os.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 8780BBBC-EFD4-4432-8C69-EA1B81CD935B 3 | :END: 4 | #+title: Setting shortcuts for mac os 5 | #+filetags: :productivity:shortcuts:macos:braindump: 6 | 7 | https://github.com/deseven/icanhazshortcut 8 | -------------------------------------------------------------------------------- /notes/20210102165851-emacs_env_for_elixir.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 8B2C4908-769F-4CF7-884D-603CE1CA619B 3 | :END: 4 | #+title: emacs env for elixir 5 | #+filetags: :emacs:hobby_project:contribution:oss:braindump: 6 | 7 | Create a setup for elixir dev in emacs. Like unmaintained `alchemist` 8 | -------------------------------------------------------------------------------- /notes/20210830185320-blockscout.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: E46C2BFA-B135-4619-9A17-1ABDED090427 3 | :END: 4 | #+title: Blockscout 5 | #+filetags: :elixir:oos:ethereum:public:braindump: 6 | 7 | [[https://github.com/blockscout/blockscout][Blockscout]] - blockchain explorer for Ethereum based chains. 8 | 9 | I've worked on it for a year 10 | -------------------------------------------------------------------------------- /config.toml: -------------------------------------------------------------------------------- 1 | baseURL = "https://braindump.badykov.com/" 2 | languageCode = "en-us" 3 | title = "Ayrat's Braindump" 4 | theme = "cortex-dark" 5 | pygmentsStyle = "dracula" 6 | 7 | [params] 8 | email = "ayratin555@gmail.com" 9 | footer = "Icon by Freepik. Built with ♥ with Org-mode and Hugo." 10 | entrypoint = "/about" 11 | repo = "https://github.com/ayrat555/braindump" -------------------------------------------------------------------------------- /notes/20210901185649-donations.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 5FBA586F-D761-4142-BE87-480BDD29748A 3 | :END: 4 | #+title: Donations 5 | #+filetags: :resources:braindump: 6 | 7 | I accept donations with: 8 | 9 | - [[https://paypal.me/AyratBadykov][PayPal]] 10 | - [[https://github.com/sponsors/ayrat555][GitHub]] 11 | - My Bitcoin address - bc1q94ru65c8pg87ghhjlc7fteuxncpyj8e28cxf42 12 | -------------------------------------------------------------------------------- /notes/20210831202518-cargo_mode.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 1C75109C-5D7A-46E4-A8FB-3C31B260ED5A 3 | :END: 4 | #+title: Cargo-mode 5 | #+filetags: :emacs:productivity:braindump: 6 | 7 | [[https://github.com/ayrat555/cargo-mode][cargo-mode]] - Emacs minor mode which allows to dynamically select a Cargo command. 8 | 9 | Cargo is the [[id:57E3FAAB-E860-413D-A285-0C7077C5EDBE][Rust]] package manager. 10 | -------------------------------------------------------------------------------- /notes/20210112095428-rudeness.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 25F99453-77B1-4761-A2B0-EAE2F19B6716 3 | :END: 4 | #+title: Authoritarian rudeness 5 | #+filetags: :society:theory:braindump: 6 | 7 | In authoritarian countries people are more rude in communications between each other. 8 | Maybe it's a root cause of rudeness in Russia? 9 | 10 | https://meduza.io/feature/2021/01/12/pochemu-sssr-konchilsya-a-hamstvo-net 11 | -------------------------------------------------------------------------------- /notes/20210831155211-hornet.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: E8BFBE5E-3D3E-49DF-A1B8-1E05F62EC96F 3 | :END: 4 | #+title: Hornet 5 | #+filetags: :oos:public:elixir:braindump: 6 | 7 | [[https://github.com/ayrat555/hornet][Hornet]] is an Elixir library for stress testing. 8 | 9 | 10 | It executes the given function with the given rate (calls per second), dynamically changing the number of processes to maintain the rate. 11 | -------------------------------------------------------------------------------- /notes/20210831213924-roam_research.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 931C6E34-F627-41DC-879E-F30AB53D5276 3 | :END: 4 | #+title: Roam research 5 | #+tiletags: :notes:braindump: 6 | 7 | [[https://roamresearch.com/][Roam research]] is one of the first popular note taking tools for organizing personal thoughts and personal knowledge management. 8 | 9 | The system is similar to [[id:1CE3E674-C06C-4879-BDE6-6C5D3150B051][Zettelkasten]] 10 | -------------------------------------------------------------------------------- /notes/20220116173133-expbkdf2.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 30652A49-5098-405D-AE6A-DD4C2885DEBA 3 | :END: 4 | #+title: ExPBKDF2 5 | #+filetags: :braindump:elixir:oss 6 | 7 | [[https://github.com/ayrat555/ex_pbkdf2][ExPBKDF2]] - Rust NIf for [[https://en.wikipedia.org/wiki/PBKDF2][Password-Based Key Derivation Function v2 (PBKDF2)]]. It uses the [[https://github.com/RustCrypto/password-hashes/tree/master/pbkdf2][pbkdf2]] rust library. 8 | -------------------------------------------------------------------------------- /notes/20210515123015-terminal_productivity.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 0BA29FD0-14E4-4EE7-9858-6B34923FF318 3 | :END: 4 | #+title: Terminal navigation 5 | #+filetags: :productivity:terminal:braindump: 6 | 7 | * fzf - command-line fuzzy finder 8 | 9 | https://github.com/junegunn/fzf 10 | 11 | * zoxide - dir navigation 12 | 13 | https://github.com/ajeetdsouza/zoxide 14 | 15 | * [[id:6094B155-1BF8-477D-B65E-E53C687B187C][tmux]] 16 | -------------------------------------------------------------------------------- /notes/20210831202235-mix_el.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: A4CC38CE-3B82-482A-8A10-73580CA088C2 3 | :END: 4 | #+title: Mix.el 5 | #+filetags: :emacs:braindump: 6 | 7 | [[https://github.com/ayrat555/mix.el][mix.el]] - Emacs Minor Mode for Mix, a build tool that ships with Elixir. 8 | 9 | Key features: 10 | 11 | - Dynamically load all available mix tasks 12 | - Can execute a mix task from inside of a subproject in the umbrella project 13 | -------------------------------------------------------------------------------- /notes/20210110202229-postgres_in_alpine.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 3D69DB01-8604-46C3-9E75-C6653BB17B95 3 | :END: 4 | #+title: Postgres in Alpine 5 | #+filetags: :docker:work:postgres:braindump: 6 | 7 | It seems postgres library is broken in alpine. 8 | 9 | I was trying to use alpine for el_monitorro docker image. 10 | `diesel` commands were failing with segmentation errors 11 | 12 | Related links: 13 | - https://github.com/diesel-rs/diesel/issues/700 14 | -------------------------------------------------------------------------------- /notes/20210831151627-exabi.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: B08DF289-F2C7-4888-9941-5915DE01FEC5 3 | :END: 4 | #+title: ExABI 5 | #+filetags: :oss:elixir:ethereum:braindump: 6 | 7 | [[https://github.com/poanetwork/ex_abi][ExABI]] - the ABI encoding implementation for Elixir. 8 | 9 | It's used for communication with Ethereum smart contracts. 10 | 11 | The specification can be found in [[https://docs.soliditylang.org/en/v0.8.7/abi-spec.html][Solidity docs]] 12 | -------------------------------------------------------------------------------- /notes/20211114125003-wireguard.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: D0A77442-9EBA-4BD0-B2FA-17C39625F177 3 | :END: 4 | #+title: Wireguard 5 | #+filetags: :braindump: 6 | 7 | [[https://en.wikipedia.org/wiki/WireGuard][Wireguard]] is a communication protocol for VPNs. It's meant to be more performant than [[https://en.wikipedia.org/wiki/OpenVPN][OpenVPN]] 8 | 9 | 10 | * Install 11 | 12 | [[https://github.com/angristan/wireguard-install][This script works like a charm]] 13 | -------------------------------------------------------------------------------- /notes/20210903214328-taskwarrior.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 03D30477-7707-4E62-BB6C-D29EE5F1534D 3 | :END: 4 | #+title: Taskwarrior 5 | #+filetags: :terminal:productivity:task:braindump: 6 | 7 | [[https://github.com/GothenburgBitFactory/taskwarrior][Taskwarrior]] - is a command line task list manager 8 | 9 | Thoughts: 10 | 11 | - It contains a subset of features from [[id:BA8CAFC9-6132-4761-BAFB-EF05C5C3306A][Org Mode]] 12 | - It may be more performant than org mode 13 | -------------------------------------------------------------------------------- /notes/20210901190330-my_emacs_projects.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 13C6A138-2ECE-4E84-9340-1EABF64ECD42 3 | :END: 4 | #+title: My emacs projects 5 | #+filetags: :oos:public:braindump: 6 | 7 | - [[id:A4CC38CE-3B82-482A-8A10-73580CA088C2][Mix.el]] - minor mode for mix (elixir) 8 | 9 | - [[id:1C75109C-5D7A-46E4-A8FB-3C31B260ED5A][Cargo-mode]] - minor mode for cargo (rust) 10 | 11 | - [[id:B091D81F-5D6E-4B03-9889-7D8BAB6F440B][Company-elixir]] - company-mode backend for Elixir 12 | -------------------------------------------------------------------------------- /notes/20210923090141-customzing_agenda_view.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 616299E4-B036-4E0D-B67F-75C704715736 3 | :END: 4 | #+title: Customzing agenda view 5 | #+filetags: :braindump:emacs:orgmofr 6 | 7 | * Removing file name prefix 8 | 9 | By default all todo items are prefixed with a file name. 10 | 11 | It's actually not a file name but a category. To show something meaningful instead of a file name, set /#+CATEGORY/ attribute in your org file. For example, /#+CATEGORY: :habit/ 12 | -------------------------------------------------------------------------------- /notes/20210924144452-diff_with_magit.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 6A69043D-AFEB-41BA-ACB1-2E1BC140DABB 3 | :END: 4 | #+title: Diff with magit 5 | #+filetags: :braindump:emacs 6 | 7 | To diff two branches *magit-diff-range* (C-x g d r) interactive function can be used 8 | 9 | 10 | * References 11 | - [[https://magit.vc/manual/magit/Diffing.html][Magit diff docs]] 12 | - [[https://emacs.stackexchange.com/questions/48111/use-magit-to-display-the-difference-between-two-branches][stackoverlow]] 13 | -------------------------------------------------------------------------------- /notes/20210831143205-exrlp.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 39D1BBE6-0ED5-4CBD-81A8-3D81B1565BFA 3 | :END: 4 | #+title: ExRLP 5 | #+filetags: :ethereum:oos:elixir:public:braindump: 6 | 7 | [[https://github.com/mana-ethereum/ex_rlp][ExRLP]] - RLP encoding implementation for Elixir 8 | 9 | The purpose of RLP (Recursive Length Prefix) is to encode arbitrarily nested arrays of binary data. 10 | 11 | Formal specification can be found in the [[id:34348C9B-ECF0-45FA-9DB9-E5632F81AE5D][Ethereum Yellow Paper]] 12 | -------------------------------------------------------------------------------- /notes/20210903215852-open_source_project_ideas.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: E054A9B2-492C-4402-8960-A3892959120A 3 | :END: 4 | #+title: Open source project ideas 5 | #+filetags: :oos:public:braindump: 6 | 7 | Here you can find a list of projects that I want to develop but apparently don't have enough time to do so. 8 | 9 | Feel free to pick / steal anything from this list. 10 | 11 | - [[id:040ABB8A-9634-427F-B41F-FD238D8EE010][Org mode parser]] 12 | - [[id:5397C9E7-0D7C-4C15-B7DE-41FF8481ED4C][HD wallets for Elixir]] 13 | -------------------------------------------------------------------------------- /notes/20210831154424-ethereum_virual_machine.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 07B9A37D-783A-4BCC-B39B-9EB989E111DC 3 | :END: 4 | #+title: Ethereum Virual Machine 5 | #+filetags: :public:ethereum:elixir:braindump: 6 | 7 | [[https://ethereum.org/en/developers/docs/evm/][EVM]] is a virtual machine used in Ethereum based blockchains. 8 | 9 | High-level smart contract languages (Solidity) are compiled to the EVM bytecode. 10 | 11 | Formal spec can be found in the [[id:34348C9B-ECF0-45FA-9DB9-E5632F81AE5D][Ethereum Yellow Paper]]. 12 | -------------------------------------------------------------------------------- /content/about.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Ayrat's Braindump" 3 | author = ["Ayrat Badykov"] 4 | type = "index" 5 | draft = false 6 | +++ 7 | 8 | # Hi! {#hi} 9 | 10 | I'm [Ayrat](https://www.badykov.com/), and you've stumbled upon my braindump. 11 | This website contains my working notes accumulated over some years. I haven't exported 12 | all notes yet. So stay tuned 13 | 14 | You can start hopping around by going to the [full index](/notes/) or [check out my open source projects](/notes/20210830181701-my_projects/). 15 | 16 | Have fun! 17 | -------------------------------------------------------------------------------- /notes/20210831150523-ethereum_yellow_paper.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 34348C9B-ECF0-45FA-9DB9-E5632F81AE5D 3 | :END: 4 | #+title: Ethereum Yellow Paper 5 | #+filetags: :ethereum:braindump: 6 | 7 | [[file:docs/ethereum-yellow-paper.pdf][Ethereum Yellow Paper]] is a formal specification of Ethereum protocol. 8 | 9 | This document is the main source of truth for implementing Ethereum nodes (clients). 10 | 11 | It's written very formal so it's better to start from [[https://ethereum.org/en/whitepaper/][the Ethereum Whitepaper]] 12 | -------------------------------------------------------------------------------- /notes/20210830183352-frankenstein.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: D996B666-5914-48B7-AB99-7FA2216BFC18 3 | :END: 4 | #+title: Frankenstein 5 | #+filetags: :rust:hobby_project:public:braindump: 6 | 7 | [[https://github.com/ayrat555/frankenstein][Frankenstein]] is a telegram client written Rust. 8 | 9 | Key features: 10 | 11 | - Simplicity 12 | - Small number of dependencies 13 | - Http client can be replaced with any library 14 | 15 | 16 | Backlog: 17 | 18 | - Think about separating objects.rs and api_params.rs into separate files for each struct 19 | -------------------------------------------------------------------------------- /notes/20210831153203-exsecp256k1.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 62B890A0-F425-4A7F-AA3D-77B0C04D22D1 3 | :END: 4 | #+title: ExSecp256k1 5 | #+filetags: :oos:elixir:rust:braindump: 6 | 7 | [[https://github.com/omgnetwork/ex_secp256k1][ExSecp256k1]] - Rust Native Implemented Function (NIF) that wraps a couple functions from [[https://github.com/paritytech/libsecp256k1][the libsecp256k1 Rust library]]. 8 | 9 | It only wraps secp256k1 functions used in Ethereum. 10 | 11 | Secp256k1 is the name of the elliptic curve to implement its public key cryptography. 12 | -------------------------------------------------------------------------------- /notes/20210303223032-amethyst.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 673EC016-A4EA-434B-AEE5-C5901F18EEC9 3 | :END: 4 | #+title: Amethyst 5 | #+filetags: :rust:amethyst:braindump: 6 | 7 | * Update [2021-10-30 Sat] 8 | 9 | Devs of the amethyst abandoned the project ([[https://amethyst.rs/posts/amethyst--starting-fresh][blog post]]). 10 | 11 | They're planning to create a new one 12 | 13 | * Resources to learn: 14 | ** Rogue like book 15 | - https://github.com/amethyst/rustrogueliketutorial 16 | 17 | ** Amethyst book 18 | - https://book.amethyst.rs/book/stable/concepts/system 19 | -------------------------------------------------------------------------------- /notes/20210831153758-bn.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 3E888A8E-CCFF-4F38-ACBA-9287816852CE 3 | :END: 4 | #+title: BN 5 | #+filetags: :oos:public:ethereum:elixir:braindump 6 | 7 | [[https://github.com/mana-ethereum/bn][BN]] - BN128 elliptic curve operations for Elixir. 8 | 9 | The implementation is inspired (copied :]) from [[https://github.com/ethereum/py_ecc][the Vitalik Buterin's python implementation]]. 10 | 11 | It was needed for the [[id:07B9A37D-783A-4BCC-B39B-9EB989E111DC][Ethereum Virual Machine]] operation codes in [[id:F792CA3D-6091-4AB6-9F6C-B5AF3FDF0084][Mana]] 12 | -------------------------------------------------------------------------------- /notes/20210910163603-line_wrapping_in_compilation_mode_buffers.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 715C0E8A-0554-48E3-AA20-08E73C8A06CE 3 | :END: 4 | #+title: Line wrapping in compilation-mode buffers 5 | #+filetags: :emacs:braindump: 6 | 7 | Add the following hook to the compilation mode to wrap long lines in compilation buffers 8 | 9 | 10 | #+BEGIN_SRC elisp 11 | (defun truncate-compilation-mode-hook () 12 | (setq truncate-lines nil) 13 | (set (make-local-variable 'truncate-partial-width-windows) nil)) 14 | (add-hook 'compilation-mode-hook 'truncate-compilation-mode-hook) 15 | #+END_SRC 16 | -------------------------------------------------------------------------------- /notes/20210831083052-cronenberg.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 95D0904C-8376-431F-AF05-1A0CA8AAA688 3 | :END: 4 | #+title: Cronenberg 5 | #+filetags: :rust:oos:public:braindump: 6 | 7 | [[https://github.com/ayrat555/cronenberg][Cronenberg]] - cron command entry parser in Rust. 8 | 9 | It's one of my first open source projects in Rust. 10 | 11 | It should still be working but I think I need to re-write because the [[https://github.com/Geal/nom][Nom]] version used in the Cronenberg is deprecated. 12 | 13 | Related links: 14 | 15 | - [[https://www.badykov.com/rust/2018/02/27/cronenberg/][Blog post in my blog]] 16 | -------------------------------------------------------------------------------- /notes/20210831232850-company_mode_for_elixir.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: B091D81F-5D6E-4B03-9889-7D8BAB6F440B 3 | :END: 4 | #+title: Company-elixir 5 | #+filetags: :emacs:oss:braindump: 6 | 7 | [[https://github.com/ayrat555/company-elixir][company-elixir]] is a [[https://github.com/company-mode/company-mode][company-mode]] completion backend for Elixir. 8 | 9 | It uses a separate IEx (Elixir's interactive shell) process to fetch completions from. 10 | 11 | I abandoned this project but it can be used as a reference for [[https://www.badykov.com/emacs/2020/05/05/async-company-mode-backend/][async company backends]]. 12 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | BASE_DIR=$(shell pwd) 2 | SOURCE_ORG_FILES=$(BASE_DIR)/notes 3 | EMACS_BUILD_DIR=/tmp/notes-home-build/ 4 | BUILD_DIR=/tmp/notes-home-build/.cache/org-persist/ 5 | HUGO_SECTION=notes 6 | 7 | all: org2hugo 8 | 9 | .PHONY: org2hugo 10 | org2hugo: 11 | mkdir -p $(BUILD_DIR) 12 | cp -r $(BASE_DIR)/init.el $(EMACS_BUILD_DIR) 13 | # Build temporary minimal EMACS installation separate from the one in the machine. 14 | HOME=$(EMACS_BUILD_DIR) NOTES_ORG_SRC=$(SOURCE_ORG_FILES) HUGO_SECTION=$(HUGO_SECTION) HUGO_BASE_DIR=$(BASE_DIR) emacs -Q --batch --load $(EMACS_BUILD_DIR)/init.el --execute "(build/export-all)" --kill 15 | -------------------------------------------------------------------------------- /notes/20210910163949-emacs_tweaks.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 9E08E9F9-8A29-4F21-B399-CD308ED43202 3 | :END: 4 | #+title: Emacs Tweaks 5 | #+filetags: :emacs:orgmode:braindump: 6 | 7 | 8 | - [[id:D1C14A02-3B6F-4B16-9095-830E77352651][Change displayed style of org links]] 9 | - [[id:715C0E8A-0554-48E3-AA20-08E73C8A06CE][Line wrapping in compilation-mode buffers]] 10 | - [[id:EC5D6348-E872-4211-BBBC-712D2E09D1F2][Enable loopback mode for pinentry]] 11 | - [[id:CACB1DBD-E0FD-4225-9ABF-92EC629D0EE1][Schedule recurring org-mode events on week days]] 12 | - [[id:616299E4-B036-4E0D-B67F-75C704715736][Customzing agenda view]] 13 | -------------------------------------------------------------------------------- /notes/20210902194855-ethereumex.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: DCE998DD-B1BE-4739-92D6-B03F30D12ED9 3 | :END: 4 | #+title: Ethereumex 5 | #+filetags: :ethereum:oss:elixir:public:braindump: 6 | 7 | [[https://github.com/mana-ethereum/ethereumex][Ethereumex]] - Elixir JSON-RPC client for the Ethereum blockchain 8 | 9 | Key features: 10 | 11 | - Supports IPC and HTTP 12 | 13 | - Batch requests 14 | 15 | - Custom RPC calls 16 | 17 | - Complete wrapper for Ethereum API 18 | 19 | 20 | It was my first Ethereum related library. I wrote the first version over one weekend. 21 | 22 | 23 | * Backlog 24 | 25 | - check if new methods are added 26 | -------------------------------------------------------------------------------- /notes/20210303215232-metal_on_mac_os.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: EADBC0AC-180A-48BC-9E4C-8574717619F2 3 | :END: 4 | #+title: metal on mac os 5 | #+filetags: :rust:amethyst:workaround:braindump: 6 | 7 | metal is needed for the amethyst framework 8 | 9 | How to fix 10 | Install Xcode from the Apple App Store. 11 | Install the command line tools with xcode-select --install. This might do nothing on your machine. 12 | If xcode-select --print-path prints /Library/Developer/CommandLineTools… 13 | then run sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer. 14 | 15 | https://github.com/gfx-rs/gfx/issues/2309#issuecomment-506130902 16 | -------------------------------------------------------------------------------- /notes/20210606075727-git_submodules.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 36DF272F-E9C0-49B8-A5C3-01BDFE6288FF 3 | :END: 4 | #+title: Git Submodules 5 | #+filetags: :productivity:git:braindump: 6 | 7 | * Deleting submodule 8 | 9 | - Delete the relevant section from the .gitmodules file. 10 | - Stage the .gitmodules changes git add .gitmodules 11 | - Delete the relevant section from .git/config. 12 | - Run git rm --cached path_to_submodule (no trailing slash). 13 | - Run rm -rf .git/modules/path_to_submodule (no trailing slash). 14 | - Commit git commit -m "Removed submodule " 15 | - Delete the now untracked submodule files rm -rf path_to_submodule 16 | -------------------------------------------------------------------------------- /notes/20210906224050-hd_wallets_for_elixir.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 5397C9E7-0D7C-4C15-B7DE-41FF8481ED4C 3 | :END: 4 | #+title: HD wallets for Elixir 5 | #+filetags: :oss:public:elixir:crypto:braindump: 6 | 7 | [[https://en.bitcoin.it/wiki/Deterministic_wallet#Type_2:_Hierarchical_deterministic_wallet][Hierarchical deterministic wallet]] is a wallet that may generate a new key pair from a master key pair for each crypto transaction to enhance privacy and security. 8 | 9 | There is already [[https://github.com/KamilLelonek/ex_wallet][an implementation for bitcoin]]. But it seems not maintained. Also it doesn't support related chains like Dogecoin. 10 | -------------------------------------------------------------------------------- /notes/20210107220015-learning_rust.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 65207E88-20BB-4BA6-93D8-54E5542CD5D3 3 | :END: 4 | #+title: Resources for learning Rust 5 | #+filetags: :career:rust:braindump: 6 | 7 | - Rust book 8 | 9 | https://doc.rust-lang.org/book/ 10 | https://doc.rust-lang.org/reference/index.html 11 | 12 | - Beginner's Series to Rust from Microsoft 13 | 14 | https://github.com/microsoft/beginners-series-rust 15 | 16 | - https://www.youtube.com/c/JonGjengset 17 | 18 | [[https://www.youtube.com/watch?v=ThjvMReOXYM][async/await from JonGjengset]] 19 | 20 | 21 | Some guides are listed in this [[https://loige.co/where-to-go-to-learn-rust-in-2021/][post]]. 22 | -------------------------------------------------------------------------------- /notes/20210917215257-emacs_and_free_time.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: F9AF4505-79F3-4342-B0B2-14979760CD0F 3 | :END: 4 | #+title: Emacs and free time 5 | #+filetags: :emacs:braindump: 6 | 7 | Emacs and Org-Mode are great things. But you may lose days and months configuring them and looking for best practices (org-mode). 8 | 9 | But I have a feeling it may pay off eventually: 10 | 11 | - In case of Emacs, you'll save time if you learn your keybindings 12 | - In case of org-mode, you'll be more organized and productive 13 | 14 | At least it's my excuse to dive into them every time. But I saw a couple of posts where people say they don't have time for Emacs as they become older. 15 | -------------------------------------------------------------------------------- /notes/20210901184335-my_resources_and_social_links.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 1A864921-060E-466A-B39B-80B652028104 3 | :END: 4 | #+title: My resources and social links 5 | #+filetags: :resources:braindump: 6 | 7 | I use two resources to write my thoughts: 8 | 9 | - [[id:DA3661CB-35B7-4CB2-B4C9-63505168E5B7][My braindump]] 10 | - [[id:E444BD6C-0BEA-429A-8142-2ED63448FC6A][My Blog]] 11 | 12 | My social links: 13 | 14 | - [[https://github.com/ayrat555][GitHub]] 15 | - [[https://twitter.com/ayrat_badykov][Twitter]] 16 | - [[https://t.me/ayrat555][Telegram]] 17 | 18 | Email - ayratin555@gmail.com 19 | 20 | If you like my work, consider [[id:5FBA586F-D761-4142-BE87-480BDD29748A][donating]] 21 | -------------------------------------------------------------------------------- /notes/20210903214239-cool_terminal_apps.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 0CE640EC-E5FB-4A95-A1CD-8EE123C06C0C 3 | :END: 4 | #+title: Cool terminal apps 5 | #+filetags: :terminal:productivity:braindump: 6 | 7 | * Task management 8 | 9 | - [[id:03D30477-7707-4E62-BB6C-D29EE5F1534D][Taskwarrior]] 10 | 11 | * [[id:0BA29FD0-14E4-4EE7-9858-6B34923FF318][Terminal navigation]] 12 | 13 | * Other 14 | 15 | - [[https://github.com/Rigellute/spotify-tui][Spotify terminal client]] 16 | 17 | it requires the GUI client. But still it's cool to browse and play spotify from your terminal 18 | 19 | * More stufff 20 | - [[https://github.com/agarrharr/awesome-cli-apps][awesome-cli-apps]] - list of cool cli apps 21 | -------------------------------------------------------------------------------- /notes/20210919165400-schedule_recurring_org_mode_events_on_week_days.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: CACB1DBD-E0FD-4225-9ABF-92EC629D0EE1 3 | :END: 4 | #+title: Schedule recurring org-mode events on week days 5 | #+filetags: :braindump:emacs:orgmode: 6 | 7 | To schedule your recurring events skipping weekends use: 8 | 9 | #+BEGIN_SRC bash 10 | - * Morning meeting 11 | - SCHEDULED: <2021-09-20 Mon ++1w> 12 | - SCHEDULED: <2021-09-21 Tue ++1w> 13 | - SCHEDULED: <2021-09-22 Wed ++1w> 14 | - SCHEDULED: <2021-09-23 Thu ++1w> 15 | - SCHEDULED: <2021-09-24 Fri ++1w> 16 | #+END_SRC 17 | 18 | [[https://stackoverflow.com/questions/28369833/emacs-org-mode-repeat-tasks-m-f-but-not-weekends][stackoverflow question]] 19 | -------------------------------------------------------------------------------- /notes/20211002164043-subdomain_with_underscores_on_github_pages.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 6CD692A1-F6A8-47DC-944C-582981A2EC7E 3 | :END: 4 | #+title: Subdomain with underscores on github pages 5 | #+filetags: :braindump: 6 | 7 | I wasn't able to enable https for my project site - https://github.com/ayrat555/el_monitorro (el_monitorro.badykov.com/) 8 | 9 | it was returning the following error: 10 | 11 | /Certificate Request Error: Certificate provisioning will retry automatically in a short period, please be patient./ 12 | 13 | It turns out GitHub can't generate an ssl ceriticate for subdomains with underscores. 14 | 15 | When I changed the subdomain to *elmonitorro*, the ssl certificate was finally generated 16 | -------------------------------------------------------------------------------- /notes/20210831213556-org_roam.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 695E8B9A-73D7-4D3F-89F2-5D11D1BA2A61 3 | :END: 4 | #+title: Org-Roam 5 | #+filetags: :emacs:notes:braindump: 6 | 7 | [[https://github.com/org-roam/org-roam][org-roam]] is a plain-text knowledge management system. It uses [[id:BA8CAFC9-6132-4761-BAFB-EF05C5C3306A][org-mode]] files. Initiallly, org-roam was developed as a [[id:931C6E34-F627-41DC-879E-F30AB53D5276][Roam research]] clone. 8 | 9 | I use org-roam almost for all my notes and [[id:DA3661CB-35B7-4CB2-B4C9-63505168E5B7][my braindump]] is generated from my org-roam notes 10 | 11 | Some thoughts about note-taking : 12 | 13 | - It seems you have to make the effort to take notes. Otherwise your notes are useless 14 | -------------------------------------------------------------------------------- /notes/20210902211035-accessing_site_variables_in_hugo_render_hooks.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 30884C9C-7F1E-49EE-B91E-02C599064A1C 3 | :END: 4 | #+title: Accessing site variables in Hugo render hooks 5 | #+filetags: :hugo:braindump: 6 | 7 | To access site variables inside of a [[https://gohugo.io/getting-started/configuration-markup#markdown-render-hooks][Hugo render hook]] it should be prepended with *.Page*. 8 | 9 | For example to access *BaseURL* instead of 10 | 11 | #+BEGIN_SRC 12 | {{ .Site.BaseURL }} 13 | #+END_SRC 14 | you shoud use 15 | 16 | 17 | #+BEGIN_SRC 18 | {{ .Page.Site.BaseURL }} 19 | #+END_SRC 20 | 21 | https://discourse.gohugo.io/t/render-hook-templates-and-site-variables/33128 22 | -------------------------------------------------------------------------------- /notes/20210901184457-my_blog.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: E444BD6C-0BEA-429A-8142-2ED63448FC6A 3 | :END: 4 | #+title: My Blog 5 | #+filteags: :resources:braindump: 6 | 7 | [[https://www.badykov.com/][My blog]] is hosted on [[https://github.com/ayrat555/ayrat555.github.io][github pages]] and it uses [[https://jekyllrb.com/][Jekyll]]. I started writing posts for it in the October of 2017. 8 | 9 | Now I write at least a single post per month. 10 | 11 | Backlog: 12 | 13 | - Change theme / maybe migrate to a different static site generator 14 | 15 | - Add search 16 | 17 | This feature is mostly needed for myself 18 | 19 | Thoughts: 20 | 21 | - Should I migrate all my posts to my [[id:DA3661CB-35B7-4CB2-B4C9-63505168E5B7][My braindump]]? 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Ayrat's braindump [![Build](https://github.com/ayrat555/braindump/actions/workflows/gh-pages.yml/badge.svg)](https://github.com/ayrat555/braindump/actions/workflows/gh-pages.yml) 2 | 3 | This is my personal collection of notes. Check it out at [Ayrat's Braindump](https://braindump.badykov.com/). 4 | 5 | [cortex-dark](https://github.com/ayrat555/cortex-dark) theme is used for this static site generated with [Hugo](https://gohugo.io/). 6 | 7 | ## How it works 8 | The [notes](notes/) folder contains [Org mode](https://orgmode.org) files that use [Org-roam](https://www.orgroam.com) to link to each other. I edit them locally using Emacs. On push Emacs is installed on CI, [ox-hugo](https://ox-hugo.scripter.co) generates hugo pages from the org files. 9 | -------------------------------------------------------------------------------- /notes/20210831195358-org_mode.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: BA8CAFC9-6132-4761-BAFB-EF05C5C3306A 3 | :END: 4 | #+title: Org Mode 5 | #+filetags: :emacs:orgmode:braindump: 6 | 7 | [[https://orgmode.org/][Org Mode]] is one of the most powerful note taking and planning tools. It uses plain text files in a special markup format. 8 | 9 | The only disappointment for me is its logo 10 | 11 | * Thoughts 12 | 13 | - It seems there are no complete parsers for org-mode files ( [[id:040ABB8A-9634-427F-B41F-FD238D8EE010][Org mode parser in Rust]] ). 14 | 15 | It would be nice to have it. For example, I want to create a custom generator of hugo files for [[id:DA3661CB-35B7-4CB2-B4C9-63505168E5B7][my braindump]]. Because ox-hugo is not very performant 16 | -------------------------------------------------------------------------------- /notes/20210903220033-org_mode_parser.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 040ABB8A-9634-427F-B41F-FD238D8EE010 3 | :END: 4 | #+title: Org mode parser in Rust 5 | #+filetags: :oos:public:rust:braindump: 6 | 7 | [[id:BA8CAFC9-6132-4761-BAFB-EF05C5C3306A][Org Mode]] is one of the best things in Emacs. 8 | 9 | But there are a lot of situations when I want to export org mode files into a different format. 10 | 11 | For example, I want to create a custom exporter of my [[id:695E8B9A-73D7-4D3F-89F2-5D11D1BA2A61][Org-Roam]] notes into [[id:DA3661CB-35B7-4CB2-B4C9-63505168E5B7][My braindump]]. 12 | 13 | There are a couple of projects but they're not complete: 14 | - [[https://github.com/PoiScript/orgize][orgize]] 15 | - [[https://github.com/org-rs/org-rs][org-rs]] 16 | -------------------------------------------------------------------------------- /notes/20220116172302-cryptopunk.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 1DD93683-7810-49E6-A28F-615896E633BD 3 | :END: 4 | #+title: Cryptopunk 5 | #+filetags: :braindump:elixir:oss:crypto 6 | 7 | 8 | [[https://github.com/ayrat555/cryptopunk][Cryptopunk]] is [[https://en.bitcoinwiki.org/wiki/Deterministic_wallet][Hierarchical deterministic wallet]] implementation for Elixir. 9 | 10 | It implements the following BIPs: 11 | 12 | - [[https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki][BIP 32]] - Hierarchical Deterministic Wallets 13 | - [[https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki][BIP 39]] - Mnemonics 14 | - [[https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki][BIP 44]] - Multi-Account Hierarchy for Deterministic Wallets 15 | -------------------------------------------------------------------------------- /notes/20210830182841-fang.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 02FBC785-4C3F-4C0C-A7CB-19A70ABCA0F7 3 | :END: 4 | #+title: Fang 5 | #+filetags: :rust:oos:public:braindump: 6 | 7 | [[https://github.com/ayrat555/fang][Fang]] is a background processing framework written in Rust. 8 | 9 | Key attribures: 10 | 11 | - Postgres DB is a job queue 12 | - Multithreaded processing 13 | 14 | * Potential features/improvements 15 | 16 | - Allow duplicates in the queue 17 | 18 | Currently you can not insert the same job in the queue multiple times. 19 | 20 | It's done mostly for [[id:BFF68ECC-6096-40BE-B6D6-9FA5AA1F62A1][El Monitorro]] 21 | 22 | - Find a way to get rid of typetag 23 | 24 | https://github.com/dtolnay/typetag/issues/35 25 | 26 | - Investigate the issue when scheduled task is too old 27 | -------------------------------------------------------------------------------- /notes/20210918145412-enable_loopback_mode_for_pinentry.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: EC5D6348-E872-4211-BBBC-712D2E09D1F2 3 | :END: 4 | #+title: Enable loopback mode for pinentry 5 | #+filetags: :emacs:git:magit:braindump: 6 | 7 | To be able to use gpg commit signing with emacs running in terminal, pinentry loopback mode should be enabled for gpg agent. 8 | 9 | 1. Add *pinentry-mode loopback* to *~/.gnupg/gpg.conf* 10 | 2. Add *allow-loopback-entry* to *~/.gnupg/gpg-agent.conf* 11 | 3. Reload the agent: *gpgconf --reload gpg-agent* 12 | 13 | References: 14 | 15 | - [[https://unix.stackexchange.com/a/655819][stackoverflow answer]] 16 | - [[https://www.fluidkeys.com/tweak-gpg-2.1.11/][random blog post]] 17 | site seems abandoned so the link may not be accessible by the time you're reading this 18 | -------------------------------------------------------------------------------- /notes/20210830184907-mana.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: F792CA3D-6091-4AB6-9F6C-B5AF3FDF0084 3 | :END: 4 | #+title: Mana 5 | #+filetags: :elixir:oos:ethereum:public:braindump: 6 | 7 | [[https://github.com/mana-ethereum/mana][Mana]] - Ethereum node implementation in Elixir. 8 | 9 | It was started as a hobby project. But after it got some attention from the community (POA Network) I've started working on it full time. 10 | 11 | I've worked on it with a good team of developers for almost a year. Now it's abandoned but it can be used as a reference. 12 | 13 | 14 | Related projects: 15 | - [[id:39D1BBE6-0ED5-4CBD-81A8-3D81B1565BFA][ExRLP]] 16 | - [[id:B08DF289-F2C7-4888-9941-5915DE01FEC5][ExABI]] 17 | - [[id:3E888A8E-CCFF-4F38-ACBA-9287816852CE][BN]] 18 | - [[id:62B890A0-F425-4A7F-AA3D-77B0C04D22D1][ExSecp256k1]] 19 | -------------------------------------------------------------------------------- /notes/20210101224257-learn_org_roam.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :roam_tags: learn emacs productivity 3 | :ID: 11CF6228-7E3A-41AC-AB54-B54A7BFFA8E6 4 | :END: 5 | #+title: Learn org-roam 6 | #+filetags: :braindump: 7 | 8 | Blog posts on org-roam: 9 | - https://notes.alexkehayias.com/org-roam/ 10 | - https://vincent.demeester.fr/articles/org_roam.html 11 | - https://www.lesswrong.com/posts/NfdHG6oHBJ8Qxc26s/the-zettelkasten-method-1 12 | 13 | Videos on zettelkasten: 14 | 15 | https://www.google.com/search?q=zettelkasten+youtube&sxsrf=ALeKk03k_168n-0OQ_xRpyQMGCzdW7u1-Q:1609530353742&source=lnms&tbm=vid&sa=X&ved=2ahUKEwjMsPXnv_vtAhXSmIsKHUdKDWcQ_AUoAXoECAYQAw&biw=1440&bih=795 16 | 17 | Improvements: 18 | - Different directory: I think content to consume should have a separate directory 19 | - Journaling ? how will it help 20 | - cypher personal stuff 21 | - cloud 22 | -------------------------------------------------------------------------------- /notes/20210831214301-zettelkasten.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 1CE3E674-C06C-4879-BDE6-6C5D3150B051 3 | :END: 4 | #+title: Zettelkasten 5 | #+filetags: :notes:braindump: 6 | 7 | [[https://en.wikipedia.org/wiki/Zettelkasten][Zettelkasten]] is a note-taking and personal knowledge management method 8 | 9 | Tools that implement this method: 10 | 11 | - [[id:695E8B9A-73D7-4D3F-89F2-5D11D1BA2A61][Org-Roam]] - [[id:51C4735C-BCF0-4C71-A917-700D8AC71253][Emacs]] package. Uses [[id:BA8CAFC9-6132-4761-BAFB-EF05C5C3306A][org-mode]] files 12 | - [[id:931C6E34-F627-41DC-879E-F30AB53D5276][Roam research]] - Commercial note taking tool 13 | - [[https://obsidian.md/][Obsidian]] - Commercial note taking tool but it uses markdown files. So users can keep their notes 14 | 15 | 16 | You can check ideas behind Zettelkasten in [[https://www.badykov.com/common/2021/03/28/org-roam/][my blog post]] 17 | -------------------------------------------------------------------------------- /notes/20210831195739-change_displayed_style_of_org_links.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: D1C14A02-3B6F-4B16-9095-830E77352651 3 | :END: 4 | #+title: Changing displayed style of org links 5 | #+filetags: :emacs:orgmode:braindump: 6 | 7 | #+BEGIN_SRC elisp 8 | (org-link-set-parameters "id" 9 | :face 'org-roam-header-line) 10 | #+END_SRC 11 | 12 | In the code snippet above replace *id* with a type of link that you want to change (for example, *http*), instead of *'org-roam-header-line* you can set any face. 13 | 14 | You can see all available links with *M-x list-faces-display* 15 | 16 | * The Problem 17 | 18 | I spent a couple of hours trying to solve this problem with *font-lock-add-keywords* function. 19 | 20 | The initial problem I was solving is setting a custom style for my org roam links. Because they're not distinguishable from other types of links. 21 | 22 | The stackoverflow answer that saved me is [[https://stackoverflow.com/questions/19057881/customize-color-of-internal-links-orgmode][customize-color-of-internal-links-orgmode]] 23 | -------------------------------------------------------------------------------- /notes/20210313110026-setting_up_gpg_on_mac_os.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 185C0D45-EF33-4A6B-9946-61B2F4D231F2 3 | :END: 4 | #+title: Setting up gpg on mac os 5 | #+filetags: :tweaks:git:braindump: 6 | 7 | 8 | * Install gpg2 and pinentry-mac: 9 | 10 | #+BEGIN_SRC bash 11 | brew install gnupg 12 | brew install pinentry-mac 13 | #+END_SRC 14 | 15 | * Generating a GPG key 16 | 17 | #+BEGIN_SRC bash 18 | #Generating key 19 | gpg --full-generate-key 20 | #Checking my key 21 | gpg --list-secret-keys --keyid-format LONG 22 | #Copying key 23 | gpg --armor --export 3AA5C34371567BD2 24 | # Setting key for git 25 | git config --global user.signingkey 3AA5C34371567BD2 26 | #+END_SRC 27 | 28 | * UI for gpg password 29 | 30 | pinentry-program /usr/local/bin/pinentry-mac 31 | 32 | #+BEGIN_SRC bash 33 | nano .gnupg/gpg-agent.conf 34 | # insert into gpg-agent 35 | pinentry-program /usr/local/bin/pinentry-mac 36 | # restart agent 37 | gpgconf --kill gpg-agent 38 | #+END_SRC 39 | 40 | 41 | 42 | https://medium.com/@jma/setup-gpg-for-git-on-macos-4ad69e8d3733 43 | -------------------------------------------------------------------------------- /notes/20210901191515-life_balance.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: FC7C90D3-8FCB-47BA-B1CD-30F796E3BF81 3 | :END: 4 | #+title: Life Balance 5 | #+filetags: :projects:games:braindump: 6 | 7 | I released a mobile game called "Life Balance" in 2019. 8 | 9 | The idea of the game is an infinite runner with multiple life bars. 10 | 11 | I released it both for [[https://play.google.com/store/apps/details?id=com.thoughtkraken.lifebalance][Android]] and iOS. But it was taken down from the App Store because I stopped my dev subscription. 12 | 13 | In 2021 I ported the game to web: 14 | 15 | - [[https://ayrat555.itch.io/life-balance][itch.io]] 16 | - [[https://thoughtkraken.com/life_balance/play][self-hosted]] 17 | 18 | The game also has a [[https://thoughtkraken.com/life_balance][landing site]]. 19 | 20 | I think the game failed financially because I didn't promote it. Now there are multiple games with similar gameplay. But at the time there were none. 21 | 22 | The song used in the web version of the game is from [[https://www.youtube.com/watch?v=ZbfVobWjNXo][Zephyr Deer]]. 23 | 24 | Backlog: 25 | 26 | - Stop paying for *thoughtkran.com* host name use *badykov.com* 27 | 28 | - Migrate landing to Github Pages or Nerlify 29 | -------------------------------------------------------------------------------- /notes/20210107221817-emacs.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 51C4735C-BCF0-4C71-A917-700D8AC71253 3 | :END: 4 | #+title: Emacs 5 | #+filetags: :emacs:productivity:braindump: 6 | 7 | Emacs is an (esoteric) text editor. Its key feature is extensibility. Emacs provides Emacs Lisp programming language which is used to write extensions. 8 | 9 | Great Emacs packages: 10 | 11 | - [[https://magit.vc/][Magit]] - a git interface 12 | - [[id:BA8CAFC9-6132-4761-BAFB-EF05C5C3306A][Org-Mode]] is a document editing, formatting, and organizing mode 13 | - [[id:695E8B9A-73D7-4D3F-89F2-5D11D1BA2A61][Org-Roam]] is a personal knowledge management tool 14 | 15 | You can check out [[https://www.badykov.com/emacs/2018/07/31/why-emacs-is-a-great-editor/][my blog post]] I wrote a long time ago where I'm trying to sell Emacs. 16 | 17 | My emacs config can be found in [[https://github.com/ayrat555/dot-emacs][the github repo]] 18 | 19 | The only problem I have with Emacs is it drains my [[id:F9AF4505-79F3-4342-B0B2-14979760CD0F][free time]] :) 20 | 21 | I wrote several [[id:13C6A138-2ECE-4E84-9340-1EABF64ECD42][emacs packages]] 22 | 23 | * [[id:9E08E9F9-8A29-4F21-B399-CD308ED43202][Emacs Tweaks]] 24 | 25 | * Backlog for this note 26 | 27 | - Add emacs packages that I use 28 | -------------------------------------------------------------------------------- /notes/20210918135953-tmux.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 6094B155-1BF8-477D-B65E-E53C687B187C 3 | :END: 4 | #+title: tmux 5 | #+filetags: :productivity:termianl:braindump: 6 | 7 | [[https://github.com/tmux/tmux][Tmux]] is a terminal multiplexer. It can be used for: 8 | 9 | - running multiple apps in one terminal 10 | 11 | this can be achieved without tmux if your terminal emulator supports window splitting 12 | 13 | - persistent sessions, for example, to run long-running tasks on a server 14 | 15 | 16 | Another termianl multiplexer is [[https://www.gnu.org/software/screen/][screen]]. I've used it for users to run long running tasks on servers. 17 | 18 | But tmux has a better community support: 19 | 20 | - [[https://github.com/tmux-plugins/tpm][TPM]] - tmux plugin mangaer 21 | - [[https://draculatheme.com/tmux][Dracula Tmux]] - tmux plugin / theme. can be installed with tpm 22 | - [[https://github.com/rothgar/awesome-tmux][awesome tmux]] - tmux stuff list 23 | 24 | 25 | * Guides 26 | ** [[https://github.com/tmux/tmux/wiki/Getting-Started][Getting Started]] 27 | ** [[https://www.ocf.berkeley.edu/~ckuehl/tmux/][tmux - a very simple beginner's guide]] 28 | ** [[https://danielmiessler.com/study/tmux/][Tactical tmux: The 10 Most Important Commands]] 29 | -------------------------------------------------------------------------------- /.github/workflows/gh-pages.yml: -------------------------------------------------------------------------------- 1 | name: github pages 2 | 3 | on: 4 | push: 5 | branches: 6 | - master # Set a branch to deploy 7 | pull_request: 8 | 9 | jobs: 10 | deploy: 11 | runs-on: ubuntu-20.04 12 | concurrency: 13 | group: ${{ github.workflow }}-${{ github.ref }} 14 | steps: 15 | - uses: actions/checkout@v2 16 | with: 17 | submodules: true # Fetch Hugo themes (true OR recursive) 18 | fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod 19 | 20 | - name: Install org-roam dependencies 21 | run: | 22 | sudo apt-get install sqlite3 23 | - name: Install emacs 24 | uses: purcell/setup-emacs@master 25 | with: 26 | version: '28.1' 27 | 28 | - name: Convert org files to hugo 29 | run: make org2hugo 30 | 31 | - name: Setup Hugo 32 | uses: peaceiris/actions-hugo@v2 33 | with: 34 | hugo-version: '0.85.0' 35 | extended: true 36 | 37 | - name: Build 38 | run: hugo --minify 39 | 40 | - name: Deploy 41 | uses: peaceiris/actions-gh-pages@v3 42 | if: ${{ github.ref == 'refs/heads/master' }} 43 | with: 44 | github_token: ${{ secrets.GITHUB_TOKEN }} 45 | publish_dir: ./public 46 | cname: braindump.badykov.com 47 | -------------------------------------------------------------------------------- /notes/20210831225847-my_braindump.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: DA3661CB-35B7-4CB2-B4C9-63505168E5B7 3 | :END: 4 | #+title: My braindump 5 | #+filetags: :notes:braindump: 6 | 7 | [[https://braindump.badykov.com/about/][My Braindump]] is generated with [[https://github.com/kaushalmodi/ox-hugo][ox-hugo]] from my [[id:695E8B9A-73D7-4D3F-89F2-5D11D1BA2A61][Org-Roam]] notes. The current idea for it is to be my personal knowledge system. 8 | 9 | * Related links: 10 | 11 | - [[https://github.com/ayrat555/braindump][github repo]] - my braindump is hosted on github with github pages 12 | - [[https://github.com/ayrat555/cortex-dark][cortex-dark]] - hugo theme for the braindump 13 | 14 | * Backlog: 15 | 16 | - Simplify the process of exporting notes 17 | 18 | - Maintain two sets of notes. 19 | 20 | Public notes will be used in the braindump. Private notes will be used for personal thoughts, projects and ideas 21 | 22 | - Add additional info to notes (created at, updated at, etc) 23 | 24 | - Take a look at the issue when there are too many stacked pages 25 | 26 | - Add analytics 27 | 28 | - Add README to the Repo 29 | 30 | * Thoughts: 31 | 32 | - Should I dump (:]) by braindump weekly ? 33 | 34 | * Content 35 | 36 | - Add a list of my posts 37 | - Add a list with blockchains that I've worked with with their key features 38 | 39 | 40 | 41 | * Good looking braindumps from other people: 42 | 43 | - https://bphenriques.github.io/knowledge-base/ 44 | - https://notes.arne.me/about-these-notes/ 45 | -------------------------------------------------------------------------------- /notes/20210920174351-track_database_changes_with_ecto_and_structure_sql.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 35E64171-AE7F-4BB6-B301-726BDF88BB7B 3 | :END: 4 | #+title: Track database changes with ecto and structure.sql 5 | #+filetags: :braindump:elixir:ecto:phoenix: 6 | 7 | * Advantages 8 | - declarative db structure 9 | - faster db setup on a clean db (you don't have to run all migrations, you can just apply structure.sql with ecto.load) 10 | 11 | * Disadvantage: 12 | - you have to update structure.sql on every migration 13 | 14 | * Steps 15 | 16 | Instead of the following (default) alias in mix.exs 17 | 18 | #+BEGIN_SRC elixir 19 | defp aliases do 20 | [ 21 | setup: ["deps.get", "ecto.setup", "cmd npm install --prefix assets"], 22 | "ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"], 23 | "ecto.reset": ["ecto.drop", "ecto.setup"], 24 | test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"] 25 | ] 26 | end 27 | #+END_SRC 28 | 29 | 30 | use the following: 31 | 32 | #+BEGIN_SRC elixir 33 | defp aliases do 34 | [ 35 | setup: ["deps.get", "ecto.setup", "cmd npm install --prefix assets"], 36 | "ecto.migrate": ["ecto.migrate", "ecto.dump"], 37 | "ecto.rollback": ["ecto.rollback", "ecto.dump"], 38 | "ecto.setup": ["ecto.create", "ecto.load --skip-if-loaded", "ecto.migrate", "run priv/repo/seeds.exs"], 39 | "ecto.reset": ["ecto.drop", "ecto.setup"], 40 | test: ["ecto.create --quiet", "ecto.load --skip-if-loaded", "ecto.migrate", "test"] 41 | ] 42 | end 43 | #+END_SRC 44 | -------------------------------------------------------------------------------- /notes/20211103175405-nomad.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: F4C7E8EF-DD90-466F-ABA5-C6D54509099A 3 | :END: 4 | #+title: Nomad 5 | #+filetags: :braindump: 6 | 7 | Nomad is a container (not only container) orchestration tool. 8 | 9 | * Intro 10 | 11 | ** [[https://learn.hashicorp.com/collections/nomad/get-started][Get Started]] 12 | 13 | ** [[https://learn.hashicorp.com/collections/nomad/manage-jobs][Manage jobs tutorial]] 14 | 15 | ** The best doc about job declaration is documentation for default job generated with "nomad job init" 16 | 17 | * Docs 18 | 19 | ** [[https://www.nomadproject.io/docs/job-specification][Job specification]] 20 | 21 | ** [[https://www.nomadproject.io/docs/drivers/docker][Docker driver]] 22 | 23 | * Trefik with nomad / consul 24 | 25 | ** [[https://learn.hashicorp.com/tutorials/nomad/load-balancing-traefik][Noman with traefik]] 26 | 27 | ** [[https://doc.traefik.io/traefik/providers/consul-catalog/][Consul with traefik]] 28 | 29 | ** [[https://atodorov.me/2021/03/27/using-traefik-on-nomad/]["Using Traefik on Nomad" blog post]] 30 | 31 | * Useful links 32 | 33 | ** [[https://github.com/efbar/hashicorp-labs][Nomad vagrant cluster]] to run nomad cluster locally 34 | 35 | ** [[https://medium.com/hashicorp-engineering/hashicorp-nomad-from-zero-to-wow-1615345aa539][From zero to wow post]] 36 | 37 | ** [[https://github.com/hashicorp/damon][Damon]] - cli client for nomad 38 | 39 | * CLI commands 40 | 41 | ** nomad alloc logs 1c67d531 doge 42 | 43 | ** nomad logs -stderr -f -tail -job fabio 44 | 45 | ** nomad alloc status 99b86719 46 | 47 | ** nomad job status -namespace=daleandchip daleandchip-dogecoin-regtest-node1 48 | 49 | ** nomad alloc status -namespace=daleandchip 86f7bbec 50 | -------------------------------------------------------------------------------- /notes/20220625105915-networking_notes.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: D0FC5F06-ADD3-4AA4-BE92-0FCBD8269553 3 | :END: 4 | #+title: Networking notes 5 | #+filetags: :braindump:notes 6 | 7 | * OSI Model 8 | 9 | 7 layers that standartize networks 10 | 11 | Not used anymore - tcp / ip is used 12 | 13 | Layers 14 | 15 | - Physical - cable 16 | - Data link - mac address 17 | - Network - ip address, routing 18 | - Transport - TCP / UDP 19 | - Session - start / stop sessions 20 | - Presentation - format data, encryption 21 | - Application - SMTP (email) 22 | 23 | * TCP/IP model 24 | 25 | Created to standartize computer networking 26 | 27 | - Application - application protocols (http, smtp, ftp) - DATA 28 | 29 | - Transport - TCP/UDP protocols - SEGMENT 30 | 31 | - Network - IP - PACKET 32 | 33 | - Data link - ETHERNET - FRAME 34 | 35 | - Physical - Cable 36 | 37 | * TCP vs UDP 38 | 39 | ** TCP 40 | 41 | - Used when good and reliable connection is needed (for example to download files) 42 | 43 | - Two computers ack the connection before it takes place. Three way handshake 44 | 45 | Syn -> Syn Ack -> Ack Received 46 | 47 | - Tcp assigns numbers to data that being sent 48 | 49 | - Receiver calculates checksum and sends to sender 50 | 51 | - Tcp will re-send data if it wasn't delivered 52 | 53 | ** UDP 54 | 55 | - It doesn't establish a session 56 | 57 | - Fire and forget protocol 58 | 59 | - Udp is faster 60 | 61 | - Live realtime connections - voice call, video calls, gaming 62 | 63 | * Mac Address 64 | 65 | Unique address assigned to network interface card 66 | 67 | * DNS - domain name system 68 | 69 | DNS translates domain name into ip address 70 | 71 | - Check local cache first 72 | - If it's not found in local cache - dns resolver 73 | - If it's not found in dns resolver - root server 74 | - Top level domain server 75 | 76 | * HTTP / HTTPS 77 | 78 | ** HTTP - data transferred not encrypted 79 | 80 | ** HTTPS - data transferred encrypted 81 | 82 | - a client tries to access an https site 83 | 84 | - a site returns a certificate with public key 85 | 86 | - a client verifies certificate in the certificate authority 87 | 88 | - a client create a new secret key and signs it with the public key in the certificate 89 | 90 | - all communication is encrypted with this private key 91 | -------------------------------------------------------------------------------- /notes/20210109164238-el_monitorro.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: BFF68ECC-6096-40BE-B6D6-9FA5AA1F62A1 3 | :END: 4 | #+title: El Monitorro 5 | #+filetags: :rust:hobby_project:public:braindump: 6 | 7 | [[https://github.com/ayrat555/el_monitorro][El Monitorro]] is a telegram bot for reading RSS, Atom and JSON feeds. It's written in Rust. 8 | 9 | It has [[https://elmonitorro.badykov.com/][a landing site]] generated from its Readme and Changelog 10 | 11 | * Key features: 12 | 13 | - High performance. 14 | 15 | All processing is done with [[id:02FBC785-4C3F-4C0C-A7CB-19A70ABCA0F7][Fang]] 16 | 17 | - Filters - users can provide key words he wants to subscribe to 18 | 19 | - Templates - users can set a format of messages 20 | 21 | Currently, it's implemented using handlebars. And UX can be improved 22 | 23 | A couple of channels created with this bot: 24 | 25 | - https://t.me/emacs_posts - Emacs News and Posts 26 | - https://t.me/metacritic_tv - Latest Tv Show Metascores on Metacritic 27 | 28 | The libraries I wrote for this project: 29 | 30 | - [[id:02FBC785-4C3F-4C0C-A7CB-19A70ABCA0F7][Fang]] 31 | - [[id:D996B666-5914-48B7-AB99-7FA2216BFC18][Frankenstein]] 32 | 33 | * Potential features / improvements 34 | 35 | - Limit the number of superfast feeds 36 | 37 | - Instead of syncing every feed periodically sync the earliest feeds. 38 | 39 | - Use handlebars directly for templates 40 | 41 | UX for templates can be improved 42 | 43 | - Allow users to set their bot token 44 | 45 | Bot hits telegram rate limit. 46 | https://t.me/el_monitorro_news/3 47 | 48 | - Add cli 49 | 50 | 51 | * Finished tasks 52 | 53 | - Do not upsert feeds items on every sync 54 | (compare the last fetched item and item in the db) 55 | 56 | [2021-09-05 Sun] 57 | 58 | [[https://github.com/ayrat555/el_monitorro/commit/87f31c00fe9a1d95d8ed2d89306ce8412b3adfbc][commit]] 59 | 60 | 61 | - Exponential backoff for failed feeds 62 | 63 | [2021-09-11 Sat] 64 | 65 | [[https://github.com/ayrat555/el_monitorro/pull/155][pr]] 66 | 67 | - Decrease docker image size by using builder 68 | 69 | [2021-09-12 Sun] 70 | 71 | [[https://github.com/ayrat555/el_monitorro/commit/c93b02233bff8adeed77ffe32f2a5215006ac108][commit]] 72 | 73 | - Update readme and release a new version of the bot on dockerhub (version 0.2) 74 | 75 | - Update env variables (version 0.2) 76 | 77 | - Add good looking landing site 78 | 79 | https://www.getzola.org/themes/juice/ 80 | -------------------------------------------------------------------------------- /init.el: -------------------------------------------------------------------------------- 1 | ;;; build.el --- Minimal emacs installation to build the website -*- lexical-binding: t -*- 2 | ;; Based on the one from Bruno Henirques: https://github.com/bphenriques/knowledge-base/blob/8fb31838fd3f682d602eeb269ee7d92eecbbb8dc/tools/init.el 3 | ;; 4 | ;;; Commentary: 5 | ;;; - Requires NOTES_BASE_ORG_SOURCE environment variable 6 | ;;; Code: 7 | 8 | (require 'subr-x) 9 | 10 | (toggle-debug-on-error) ;; Show debug informaton as soon as error occurs. 11 | (setq make-backup-files nil) ;; Disable "~" backups. 12 | 13 | (defconst notes-org-files 14 | (let* ((env-key "NOTES_ORG_SRC") 15 | (env-value (getenv env-key))) 16 | (if (and env-value (file-directory-p env-value)) 17 | env-value 18 | (error (format "%s is not set or is not an existing directory (%s)" env-key env-value))))) 19 | 20 | ;; Setup packages using straight.el: https://github.com/raxod502/straight.el 21 | (defvar bootstrap-version) 22 | (let ((bootstrap-file 23 | (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) 24 | (bootstrap-version 5)) 25 | (unless (file-exists-p bootstrap-file) 26 | (with-current-buffer 27 | (url-retrieve-synchronously 28 | "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" 29 | 'silent 'inhibit-cookies) 30 | (goto-char (point-max)) 31 | (eval-print-last-sexp))) 32 | (load bootstrap-file nil 'nomessage)) 33 | 34 | (setq straight-use-package-by-default t) 35 | (straight-use-package 'use-package) 36 | 37 | (use-package backtrace) 38 | (use-package ox-hugo 39 | :straight (:type git :host github :repo "kaushalmodi/ox-hugo")) 40 | 41 | ;;; Public functions 42 | (defun build/export-all () 43 | "Export all org-files (including nested) under notes-org-files." 44 | 45 | (setq org-hugo-base-dir 46 | (let* ((env-key "HUGO_BASE_DIR") 47 | (env-value (getenv env-key))) 48 | (if (and env-value (file-directory-p env-value)) 49 | env-value 50 | (error (format "%s is not set or is not an existing directory (%s)" env-key env-value))))) 51 | 52 | (setq org-hugo-section "notes") 53 | 54 | (dolist (org-file (directory-files-recursively notes-org-files "\.org$")) 55 | (with-current-buffer (find-file org-file) 56 | (message (format "[build] Exporting %s" org-file)) 57 | (org-hugo-export-wim-to-md :all-subtrees nil nil nil))) 58 | 59 | (message "Done!")) 60 | 61 | (provide 'build/export-all) 62 | 63 | ;;; init.el ends here 64 | -------------------------------------------------------------------------------- /notes/20210830181701-my_projects.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 4CF13259-E789-4627-8E9A-B2FE8A7A2194 3 | :END: 4 | #+title: My projects 5 | #+filetags: :oos:public:braindump: 6 | 7 | * [[id:57E3FAAB-E860-413D-A285-0C7077C5EDBE][Rust]] 8 | 9 | - [[id:BFF68ECC-6096-40BE-B6D6-9FA5AA1F62A1][El Monitorro]] - Telegram bot for reading feeds in Rust 10 | 11 | - [[id:02FBC785-4C3F-4C0C-A7CB-19A70ABCA0F7][Fang]] - Background processing library in Rust 12 | 13 | - [[id:D996B666-5914-48B7-AB99-7FA2216BFC18][Frankenstein]] - Telegram client for Rust 14 | 15 | - [[id:95D0904C-8376-431F-AF05-1A0CA8AAA688][Cronenberg]] - Simple cron command entry parser in Rust 16 | 17 | * Elixir 18 | 19 | - [[id:F792CA3D-6091-4AB6-9F6C-B5AF3FDF0084][Mana]] - Ethereum implementation in Elixir 20 | 21 | - [[id:E46C2BFA-B135-4619-9A17-1ABDED090427][Blockscout]] - Ethereum explorer 22 | 23 | - [[id:39D1BBE6-0ED5-4CBD-81A8-3D81B1565BFA][ExRLP]] - Elixir implementation of Ethereum's RLP (Recursive Length Prefix) encoding 24 | 25 | - [[id:B08DF289-F2C7-4888-9941-5915DE01FEC5][ExABI]] - The Application Binary Interface (ABI) of Solidity for Elixir 26 | 27 | - [[id:1DD93683-7810-49E6-A28F-615896E633BD][Cryptopunk]] - Hierarchical deterministic wallet for Elixir. 28 | 29 | - [[id:62B890A0-F425-4A7F-AA3D-77B0C04D22D1][ExSecp256k1]] - Libsecp256k1 NIF 30 | 31 | - [[id:DCE998DD-B1BE-4739-92D6-B03F30D12ED9][Ethereumex]] - Elixir JSON-RPC client for the Ethereum blockchain 32 | 33 | - [[id:30652A49-5098-405D-AE6A-DD4C2885DEBA][ExPBKDF2]] - Rust NIf for Password-Based Key Derivation Function v2 (PBKDF2) 34 | 35 | - [[id:3E888A8E-CCFF-4F38-ACBA-9287816852CE][BN]] - BN128 elliptic curve operations for Elixir. 36 | 37 | - [[id:E8BFBE5E-3D3E-49DF-A1B8-1E05F62EC96F][Hornet]] - Simple library for stress testing 38 | 39 | - [[https://github.com/ayrat555/clope][CLOPE]] - Elixir implementation of CLOPE 40 | 41 | A Fast and Effective Clustering Algorithm for Transactional Data 42 | 43 | - [[https://github.com/ayrat555/rock][ROCK]] - Elixir implementation of ROCK 44 | 45 | A Robust Clustering Algorithm for Categorical Attributes 46 | 47 | - [[https://github.com/ayrat555/eth_bloom][EthBloom]] - Ethereum's bloom filter implementation in elixir, integrated in Mana 48 | 49 | - [[https://github.com/CryptoHamsters/uploadcare_ex][UploadcareEx]] - Simple Elixir wrapper for Uploadcare API 50 | 51 | - [[https://github.com/BalalaikaIndustries/balalaika_bear][BalalaikaBear]] - VK API wrapper for Elixir 52 | 53 | - [[https://github.com/ayrat555/ex_riak_cs][ExRiakCS]] - Riak CS API wrapper for Elixir 54 | 55 | * [[id:13C6A138-2ECE-4E84-9340-1EABF64ECD42][My emacs projects]] 56 | 57 | * Games 58 | 59 | - [[id:FC7C90D3-8FCB-47BA-B1CD-30F796E3BF81][Life Balance]] 60 | 61 | 62 | If you like my work, consider [[id:5FBA586F-D761-4142-BE87-480BDD29748A][donating]] 63 | -------------------------------------------------------------------------------- /notes/20210830224139-rust.org: -------------------------------------------------------------------------------- 1 | :PROPERTIES: 2 | :ID: 57E3FAAB-E860-413D-A285-0C7077C5EDBE 3 | :END: 4 | #+title: Rust 5 | #+filetags: :braindump: 6 | 7 | [[https://www.rust-lang.org/][Rust]] is a high level, general purpose, statically typed programming language. 8 | 9 | Key features: 10 | 11 | - Performance 12 | - Safety 13 | 14 | * Advantages of Rust 15 | - Move semantics 16 | - Minimal runtime 17 | - Efficient C bindings 18 | - Trait based generics 19 | - Zero cost abstractions 20 | - Pattern matching 21 | - Type inference 22 | 23 | * Trait object 24 | 25 | - object that stores value of any type as long as it implements the trait 26 | - data pointer and vtable pointer (trait impl) 27 | - a generic type parameter can only work with one concrete type at a time, whereas trait objects allow for multiple concrete types to fill in for the trait object at run-time 28 | 29 | * Programming Rust 30 | 31 | ** Why Rust 32 | 33 | *** Performance 34 | 35 | in terms of performance Rust is comparable to C++ and can be used in the same domain 36 | 37 | But it solves some problems attributed to C++ 38 | 39 | - Undefined behaviour (double frees, null pointer derefence etc) 40 | 41 | It solves this problem by having strict compiler checks and shift of paradigm (borrowing) 42 | 43 | - Parallel Programming 44 | 45 | Data can be used between threads without data racing 46 | 47 | *** Pleasant to use 48 | 49 | - type inference 50 | 51 | - zero cost abstractions 52 | 53 | - pattern matching 54 | 55 | ** Types 56 | 57 | *** Numeric 58 | - u8 - u128 59 | - i8 - i128 60 | - usize / isize 61 | - f32 / f64 62 | 63 | *** Bool 64 | *** Char 65 | Unicode character 66 | *** Tuple 67 | *** Refence types 68 | Single write or Mutable Readers 69 | 70 | - Immutable reference (&T) 71 | - Multable Reference (&mut T) 72 | 73 | *** Box 74 | 75 | A way to allocate value on heap 76 | 77 | *** Sequences of values in memory 78 | 79 | - Array 80 | 81 | constant size 82 | 83 | - Vector 84 | 85 | - allocated on Heap 86 | - growable 87 | 88 | - Slice 89 | 90 | - refences to series of elements of other value 91 | - pointer to the fiest elelemnt and size you can access 92 | 93 | *** String types 94 | 95 | - String - UTF-8 encoded text. buffer allocated on heap 96 | - &str - a refence to UTF-8 text owned by someone else. can be thought as &[u8] 97 | 98 | ** Ownership and moves 99 | 100 | *** Two types of managing memory 101 | 102 | - Safety first - garbage collector 103 | - Control first - programming is in charge of freeing memory - C++ 104 | - Rust - uses different approaches by inventing a new way of working with pointers 105 | 106 | *** Ownerships 107 | 108 | - you can change owner 109 | - simple types are excused from ownershop rules - they're copy types 110 | - std provides reference-counted types Rc and Arc - they allow value to have multiple owners 111 | - you can borrow a refences 112 | 113 | ** References 114 | 115 | - Shared reference 116 | 117 | Read but not modify its referent. Unlimited number at the same time 118 | 119 | - Mutable Reference 120 | 121 | Read and modify. Only single refence of this type at the same time 122 | 123 | - Fat Pointers 124 | - reference to a slice 125 | - trait object 126 | 127 | - Static 128 | 129 | Rust's equavent of global varialbe. It's global in lifetime, not visibility 130 | 131 | ** Error handling 132 | 133 | Panic 134 | 135 | - Out of bounds array access 136 | - Assertion by zero 137 | - Devision by zero 138 | --------------------------------------------------------------------------------