-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9c8201b
Showing
40 changed files
with
918 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,213 @@ | ||
# zk configuration file | ||
# | ||
# Uncomment the properties you want to customize. | ||
|
||
# NOTE SETTINGS | ||
# | ||
# Defines the default options used when generating new notes. | ||
[note] | ||
|
||
# Language used when writing notes. | ||
# This is used to generate slugs or with date formats. | ||
#language = "en" | ||
|
||
# The default title used for new note, if no `--title` flag is provided. | ||
default-title = "Untitled" | ||
|
||
# Template used to generate a note's filename, without extension. | ||
filename = "{{id}}-{{slug title}}" | ||
|
||
# The file extension used for the notes. | ||
extension = "md" | ||
|
||
# Template used to generate a note's content. | ||
# If not an absolute path, it is relative to .zk/templates/ | ||
template = "default.md" | ||
|
||
# Path globs ignored while indexing existing notes. | ||
#ignore = [ | ||
# "drafts/*", | ||
# "log.md" | ||
#] | ||
|
||
# Configure random ID generation. | ||
|
||
# The charset used for random IDs. You can use: | ||
# * letters: only letters from a to z. | ||
# * numbers: 0 to 9 | ||
# * alphanum: letters + numbers | ||
# * hex: hexadecimal, from a to f and 0 to 9 | ||
# * custom string: will use any character from the provided value | ||
id-charset = "alphanum" | ||
|
||
# Length of the generated IDs. | ||
id-length = 4 | ||
|
||
# Letter case for the random IDs, among lower, upper or mixed. | ||
id-case = "lower" | ||
|
||
|
||
# EXTRA VARIABLES | ||
# | ||
# A dictionary of variables you can use for any custom values when generating | ||
# new notes. They are accessible in templates with {{extra.<key>}} | ||
[extra] | ||
|
||
author = "Felipe Marcelino" | ||
|
||
|
||
# GROUP OVERRIDES | ||
# | ||
# You can override global settings from [note] and [extra] for a particular | ||
# group of notes by declaring a [group."<name>"] section. | ||
# | ||
# Specify the list of directories which will automatically belong to the group | ||
# with the optional `paths` property. | ||
# | ||
# Omitting `paths` is equivalent to providing a single path equal to the name of | ||
# the group. This can be useful to quickly declare a group by the name of the | ||
# directory it applies to. | ||
|
||
#[group."<NAME>"] | ||
#paths = ["<DIR1>", "<DIR2>"] | ||
#[group."<NAME>".note] | ||
#filename = "{{format-date now}}" | ||
#[group."<NAME>".extra] | ||
#key = "value" | ||
|
||
[group.journal] | ||
paths = ["journal/weekly", "journal/daily"] | ||
|
||
[group.journal.note] | ||
filename = "{{format-date now}}" | ||
|
||
|
||
# MARKDOWN SETTINGS | ||
[format.markdown] | ||
|
||
# Format used to generate links between notes. | ||
# Either "wiki", "markdown" or a custom template. Default is "markdown". | ||
link-format = "[[{{filename}}]]" | ||
# Indicates whether a link's path will be percent-encoded. | ||
# Defaults to true for "markdown" format and false for "wiki" format. | ||
#link-encode-path = true | ||
# Indicates whether a link's path file extension will be removed. | ||
# Defaults to true. | ||
#link-drop-extension = true | ||
|
||
# Enable support for #hashtags. | ||
hashtags = true | ||
# Enable support for :colon:separated:tags:. | ||
colon-tags = true | ||
# Enable support for Bear's #multi-word tags# | ||
# Hashtags must be enabled for multi-word tags to work. | ||
multiword-tags = false | ||
|
||
|
||
# EXTERNAL TOOLS | ||
[tool] | ||
|
||
# Default editor used to open notes. When not set, the EDITOR or VISUAL | ||
# environment variables are used. | ||
editor = "nvim" | ||
|
||
shell = "/bin/zsh" | ||
|
||
# Pager used to scroll through long output. If you want to disable paging | ||
# altogether, set it to an empty string "". | ||
pager = "less -FIRX" | ||
|
||
# Command used to preview a note during interactive fzf mode. | ||
# Set it to an empty string "" to disable preview. | ||
|
||
# bat is a great tool to render Markdown document with syntax highlighting. | ||
#https://github.com/sharkdp/bat | ||
fzf-preview = "bat -p --color always {-1}" | ||
|
||
|
||
# LSP | ||
# | ||
# Configure basic editor integration for LSP-compatible editors. | ||
# See https://github.com/mickael-menu/zk/blob/main/docs/editors-integration.md | ||
# | ||
[lsp] | ||
|
||
[lsp.diagnostics] | ||
# Each diagnostic can have for value: none, hint, info, warning, error | ||
|
||
# Report titles of wiki-links as hints. | ||
wiki-title = "hint" | ||
# Warn for dead links between notes. | ||
dead-link = "error" | ||
|
||
[lsp.completion] | ||
# Customize the completion pop-up of your LSP client. | ||
|
||
# Show the note title in the completion pop-up, or fallback on its path if empty. | ||
#note-label = "" | ||
# Filter out the completion pop-up using the note title or its path. | ||
#note-filter-text = " " | ||
# Show the note filename without extension as detail. | ||
#note-detail = "" | ||
|
||
|
||
# NAMED FILTERS | ||
# | ||
# A named filter is a set of note filtering options used frequently together. | ||
# | ||
[filter] | ||
|
||
# Matches the notes created the last two weeks. For example: | ||
# $ zk list recents --limit 15 | ||
# $ zk edit recents --interactive | ||
recents = "--sort created- --created-after 'last two weeks'" | ||
|
||
|
||
# COMMAND ALIASES | ||
# | ||
# Aliases are user commands called with `zk <alias> [<flags>] [<args>]`. | ||
# | ||
# The alias will be executed with `$SHELL -c`, please refer to your shell's | ||
# man page to see the available syntax. In most shells: | ||
# * $@ can be used to expand all the provided flags and arguments | ||
# * you can pipe commands together with the usual | character | ||
# | ||
[alias] | ||
# Here are a few aliases to get you started. | ||
|
||
# Shortcut to a command. | ||
#ls = "zk list $@" | ||
|
||
# Default flags for an existing command. | ||
#list = "zk list --quiet $@" | ||
|
||
# Edit the last modified note. | ||
#editlast = "zk edit --limit 1 --sort modified- $@" | ||
|
||
# Edit the notes selected interactively among the notes created the last two weeks. | ||
# This alias doesn't take any argument, so we don't use $@. | ||
#recent = "zk edit --sort created- --created-after 'last two weeks' --interactive" | ||
|
||
# Print paths separated with colons for the notes found with the given | ||
# arguments. This can be useful to expand a complex search query into a flag | ||
# taking only paths. For example: | ||
# zk list --link-to "`zk path -m potato`" | ||
#path = "zk list --quiet --format {{path}} --delimiter , $@" | ||
|
||
# Show a random note. | ||
#lucky = "zk list --quiet --format full --sort random --limit 1" | ||
|
||
# Returns the Git history for the notes found with the given arguments. | ||
# Note the use of a pipe and the location of $@. | ||
#hist = "zk list --format path --delimiter0 --quiet $@ | xargs -t -0 git log --patch --" | ||
|
||
# Edit this configuration file. | ||
#conf = '$EDITOR "$ZK_NOTEBOOK_DIR/.zk/config.toml"' | ||
|
||
edlast = "zk edit --limit 1 --sort modified- $@" | ||
|
||
# Edit the notes selected interactively among the notes created the last two weeks. | ||
recent = "zk edit --sort created- --created-after 'last two weeks' --interactive" | ||
|
||
# Show a random note. | ||
lucky = "zk list --quiet --format full --sort random --limit 1" |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# {{title}} | ||
|
||
{{content}} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# genexp | ||
#programming #language #clojure #functional | ||
|
||
- Save more memory comparable to [[ndtq-listcomp]] | ||
- Can be used with tuples, arrays and other sequences | ||
- Save the cost to build a list | ||
|
||
```python | ||
>>> symbols | ||
>>> tuple (ord(symbol) for symbol in symbols) | ||
(36, 162, 163, 165, 8364, 164) | ||
|
||
>>> import array | ||
>>> array.array ('I', (ord(symbol) for symbol in symbols)) | ||
array('I', [36, 162, 163, 165, 8364, 1647]) | ||
|
||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
# Inherit | ||
#nix #nixos #programming #language | ||
|
||
It is a way to assign a variable inside a scope that is nested inside another scope using the same name | ||
|
||
|
||
```nix | ||
let | ||
x = 1; | ||
y = 2; | ||
in | ||
{ | ||
inherit x y; # or { x = 1; y = 2; } => x = x; y = y | ||
} | ||
let | ||
a = {x = 1; y = 2;}; | ||
in | ||
{ | ||
inherit (a) x y; # { x = 1; y = 2;} => x = a.x; y = a.y; | ||
} | ||
let | ||
inherit ({x = 1; y = 2;}) x y; | ||
in [ x y ] # [ 1 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Zettelkasten | ||
#zettelkasten #notes #system #reading #ideas #books #learning #organization | ||
|
||
Zettelkasten is a tool to create and writing personal thoughts on notes and connected them like graphs. | ||
- Organize your information about everything in one place. | ||
- Use napkins, papers, voice recording etc. to record your [[ave9-fleeting-notes]]#. It is good idea always have a pen | ||
and scratchpad with you. | ||
- Zotero is a good tool to be the reference management system. | ||
- Use [[8imv-slip-box]]# to store the [[wz0b-permanent-notes]]# | ||
- [[ndec-literature-notes]]# need to have at least author and year. But can have page as well. | ||
- There is a method on [[7t2m-how-to-take-smart-notes]] | ||
|
||
### References | ||
|
||
How to take smart notes (Ahrens, 2017, p29-30) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Lookup Paths | ||
#nix #nixos #language #programming #functional | ||
|
||
They are wrapped by `<>` like `<nixpkgs>` which transform into `/nix/var/nix/profiles/per-user/root/channels/nixpkgs` | ||
and are dependents `builtins.nixPath`. Another example `<nixpkgs/lib> = | ||
/nix/var/nix/profiles/per-user/root/channels/nixpkgs/lib` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Python Sequences | ||
#programming #language #python #datastructure | ||
|
||
Containers: list, tuple, collections.deque → It has a reference of the object | ||
Flat: string, bytes, array.array → It stores the value of the object itself | ||
|
||
Mutable: list, bytearray, array.array, deque | ||
* You can change the sequence itself | ||
Immutable: tuple, string, bytes | ||
* Sequence does not change, and a new one is created |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Python Data Model | ||
#programming #language #python #datastructure | ||
|
||
Data model is a description or interface for Python as framework. | ||
It makes you code easy to interpret and being supported by common functions/methods in python | ||
For example if you implement the method ```__get_item__``` you are able to use the following methods on python | ||
- `choice` | ||
- `slice [:3]` | ||
- `index [1]` | ||
- `iteration` | ||
|
||
```python | ||
# iteration | ||
for obj in objs: | ||
print(obj) | ||
``` | ||
|
||
Python has other methods like `__repr__` to represent the object like as the creation of this. `__bool__` to | ||
make conditional valid or invalid in some situation. `__str__` to present/print the object in human-readable way and | ||
others. | ||
|
||
**Obs**: It is common to use `!r` with the function `__repr__` and *f-strings*. | ||
|
||
In data models the functions is not call by the use but by the interpreter, in that way, the code has more performance. | ||
The only method call by the user is the method to initialize the object/class `__init__`. | ||
|
||
An example of python data model. | ||
|
||
```python | ||
import collections | ||
|
||
Card = collections.namedtuple('Card', ['rank', 'suit']) | ||
|
||
class FrenchDeck: | ||
ranks = [str(n) for n in range(2, 11) + list('JQKA')] | ||
suits = 'spades diamonds clubs hears'.split() | ||
|
||
def __init__(self): | ||
self._cards = [Card(rank, suit) for suit in self.suits | ||
for rank in self.ranks] | ||
|
||
def __len__(self): | ||
return len(self._cards) | ||
|
||
def __get__item(self, position): | ||
return self._cards[position] | ||
``` | ||
|
||
Implementing python data model it is possible above is possible to use it in the iteration `for` or [[ndtq-listcomp]]#. | ||
Avoid [[82os-python-tuples]]# for mutable objects. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Why do we take notes? | ||
#notes #writing #ideas | ||
|
||
- We take notes when we want puts ideas on paper, organize our thinking and exchange ideas with other people. | ||
- Take notes make the writing easy, however the feedback of a good/bad note is not immediate. | ||
- Rely on the system you are used to writing you notes. Focusing on the ideas |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# String Interpolation | ||
#nix #nixos #programming #language | ||
|
||
```nix | ||
let | ||
name = "nix"; | ||
in | ||
"hello ${name}" # "hello nix" | ||
``` | ||
```nix | ||
let | ||
out = "nix"; | ||
in | ||
"echo ${out} > $out" # $out is a bash variable | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# How to Take Smart Notes | ||
#notes #writing #reading #zettelkasten #books #learning #organization #system | ||
|
||
- Organize notes in only one place, with the same format, in that way it is easier to process them later. | ||
- On your [[8imv-slip-box]] the notes are divided by context not by topics | ||
- The [[8imv-slip-box]] becomes more valuable as more it increases its size with the number of notes. | ||
- **Project Notes** are notes regarding a specific project. | ||
- Collect notes from multiple sources for multiple projects and does not being stuck on only one project because the | ||
connection between notes can be limited. | ||
- Take care of transforming everything into [[ave9-fleeting-notes]] and in that way be induced to restart everything | ||
again. | ||
- [[wz0b-permanent-notes]] are sources of knowledge because they all have enough context to be understandable. | ||
- Try to process [[ave9-fleeting-notes]] and [[ndec-literature-notes]] as fast as possible to because you can lose its | ||
context before passing it to [[wz0b-permanent-notes]]. | ||
- Only [[wz0b-permanent-notes]] are put in the [[8imv-slip-box]]. | ||
- | ||
|
||
### References | ||
|
||
How to take smart notes (Ahrens, 2017, p38-44) |
Oops, something went wrong.