Skip to content

Commit 604ba3c

Browse files
author
dvogt23
committed
Notes/tech/app/obsidian.md
Notes/tech/coding/rails.md Notes/tech/coding/ruby.md
1 parent 27af66b commit 604ba3c

File tree

3 files changed

+121
-0
lines changed

3 files changed

+121
-0
lines changed

Notes/tech/app/obsidian.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Obsidian
2+
A collection of obsidian specific styling and configurations, that Im using in my vault.
3+
4+
#### Checkboxes
5+
```
6+
- [ ] Unchecked
7+
- [X] Checked
8+
- [-] Dropped
9+
- [>] Forward
10+
- [D] Date
11+
- [?] Question
12+
- [/] Half Done
13+
- [+] Add
14+
- [R] Research
15+
- [!] Important
16+
- [i] Idea
17+
- [B] Brainstorm
18+
- [P] Pro
19+
- [C] Con
20+
- [Q] Quote
21+
- [N] Note
22+
- [b] Bookmark
23+
- [I] Information
24+
- [p] Paraphrase
25+
- [L] Location
26+
- [E] Example
27+
- [A] Answer
28+
- [r] Reward
29+
- [c] Choice
30+
- [d] Doing
31+
- [T] Time
32+
- [@] Character / Person
33+
- [t] Talk
34+
- [O] Outline / Plot
35+
- [~] Conflict
36+
- [W] World
37+
- [f] Clue / Find
38+
- [F] Foreshadow
39+
- [H] Favorite / Health
40+
- [&] Symbolism
41+
- [s] Secret
42+
- [x] Regular
43+
```
44+
45+
- [ ] Unchecked
46+
- [X] Checked
47+
- [-] Dropped
48+
- [>] Forward
49+
- [D] Date
50+
- [?] Question
51+
- [/] Half Done
52+
- [+] Add
53+
- [R] Research
54+
- [!] Important
55+
- [i] Idea
56+
- [B] Brainstorm
57+
- [P] Pro
58+
- [C] Con
59+
- [Q] Quote
60+
- [N] Note
61+
- [b] Bookmark
62+
- [I] Information
63+
- [p] Paraphrase
64+
- [L] Location
65+
- [E] Example
66+
- [A] Answer
67+
- [r] Reward
68+
- [c] Choice
69+
- [d] Doing
70+
- [T] Time
71+
- [@] Character / Person
72+
- [t] Talk
73+
- [O] Outline / Plot
74+
- [~] Conflict
75+
- [W] World
76+
- [f] Clue / Find
77+
- [F] Foreshadow
78+
- [H] Favorite / Health
79+
- [&] Symbolism
80+
- [s] Secret
81+
- [x] Regular
82+
83+
#### Admonitions
84+
> [!recite|color-blue]
85+
> test
86+
87+
#### Callouts
88+
> [!question] Can callouts be nested?
89+
> > [!todo] Yes!, they can.
90+
> > > [!example] You can even use multiple layers of nesting.
91+

Notes/tech/coding/rails.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ Learning from some youtube guys:
3535
- [Ruby on Rails - Bounded contexts via interface objects](https://blog.eq8.eu/article/rails-bounded-contexts.html)
3636
- [Enforcing Modularity inside a Rails Monolith | by Thomas Pagram | The Airtasker Tribe | Medium](https://medium.com/airtribe/enforcing-modularity-inside-a-rails-monolith-f856adb54e1d)
3737
- [Enforcing Modularity in Rails Apps with Packwerk](https://shopify.engineering/enforcing-modularity-rails-apps-packwerk)
38+
39+
3840
### Pattern matching
3941

4042
```ruby
@@ -363,6 +365,8 @@ Source: [appsignal/blog](https://blog.appsignal.com/2021/08/24/responsible-monke
363365
## RSpec
364366
### Bisect flaky tests
365367
with `rspec --bisect <file>` you could find flaky test setting to re-run it.
368+
> [!Hint]
369+
If `rspec` exits with `1` if suite passes, try `untilpass() { until "$@"; do :; done }` and run it with `untilpass rspec ...`
366370
### Testing an array with attributes
367371

368372
```ruby

Notes/tech/coding/ruby.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Some interesting ressources for the programming language ruby.
1616

1717
## Interesting
1818
- [operators](https://www.visualmode.dev/ruby-operators)
19+
- [understanding ruby](https://dev.to/baweaver/understanding-ruby-triple-equals-2p9c)
1920

2021
## RVM SSL errors
2122

@@ -63,6 +64,17 @@ pluralize(count, "apple") # pluralize if count > 1 to apples
6364

6465
```
6566

67+
## Scripting
68+
```bash
69+
require 'bundler/inline'
70+
gemfile do
71+
source 'https://rubygems.org'
72+
gem 'sqlite3'
73+
end
74+
# write ruby code below
75+
...
76+
```
77+
6678
## Lambda composition
6779
Combine lambda blocks together with `>>` i.e. to create a new one like `TAX_FEE = TAX >> FEE`
6880

@@ -135,6 +147,20 @@ IP_REGEX = /
135147
```
136148
Source: [dev.to/baweaver](https://dev.to/baweaver/pattern-matching-interfaces-in-ruby-1b15)
137149

150+
Case for array items:
151+
```ruby
152+
def process (input)
153+
case input
154+
in []
155+
:empty
156+
in [*] if input.all?(Order)
157+
:has_only_orders
158+
in [*] if input.all? (Payment)
159+
:has_only_payments
160+
else
161+
end
162+
```
163+
138164
## Refinement
139165

140166
Extend/overwrite string behavior in module (specific scope)

0 commit comments

Comments
 (0)