# ⚡️ Knowledge

> A growing repository of everything I learned

*Note: If you are looking at this in GitHub, I suggest you head over to* [*wiki.christianpoplawski.de*](https://wiki.christianpoplawski.de) *as it is a much more pleasent browsing experience.*

## What topics are in here?

Pretty much everything. I started this as a repository of quick notes of learning I had while programming. A while ago, I stumble over [Nikita's wiki](https://wiki.nikiv.dev/) and decided to go all in. Since then, this is a place for pretty much everything I learned, independent from its general area.


# Talks I like

A list of talks I listened to and like

## Environment

### [Time's Up! by Mark Benecke (German)](https://www.youtube.com/watch?v=AAi_I73kqcE)

A talk held at TU Dortmund about environmental issues, global warimg, how bad it really is and what we can still do about it (and why probably nothing will happen).


# Thinking

(The title of this page is not great, but I can't think of a better one just yet)

## Motte-and-bailey fallacy

[Wikipedia](https://www.wikiwand.com/en/Motte-and-bailey_fallacy)

When an arguer combines to positions, one easy to defend and the other one controversial and much harder to defend. When challanged on their position, they will claim to only advance on the modes position.

Example:\
A: Homeopathic medicine can cure cancer. (bailey)\
B: There’s no evidence showing homeopathy is effective.\
A: Actually there are many ways for people to be healthy besides taking doctor-prescribed drugs. (motte)


# Unix

## mkdir

### Create intermediate directories

Use the `-p` option:

```bash
$ mkdir -p /new/also-new/new-as-well
```

Will create the `new`, `also-new` as well as the `new-as-well` dirs.

From the manpages:

> Create intermediate directories as required. If this option is not specified, the full path prefix of each operand must already exist. On the other hand, with this option specified, no error will be reported if a directory given as an operand already exists. Intermediate directories are created with permission bits of “rwxrwxrwx” (0777) as modified by the current umask, plus write and search permission for the owner.


# CSS


# CSS

## Cascade & Inheritance

The cascade algorithm determines which CSS rules will be applied to an element. For determination, three factors are significant:

1. Importance
2. Specificity
3. Source order

### Importance

To keep this short: If a CSS rule has applied `!important` to it, it will win in almost all cases.

```markup
  <a id="button" href="#">Buy now</a>
```

```css
/* A very specific rule */
#button {
  background-color: green;
}

/* This will win anyway */
a {
  background-color: red; !important
}
```

A good rule of thumb is to **never use** `!important`.

There are some exceptions where `!important` can be overridden:

1. When a second `!important` statement is placed later in the code&#x20;
2. When another stylesheet with a higher priority overrides the rule

### Specificity

Rules are ordered by specificity, the rule with the highest specificity is applied. To rank the specificity of a rule, a point system is applied.

| Type                                                                    | Points |
| ----------------------------------------------------------------------- | ------ |
| Inside a `<style>` tag or inline styles                                 | 1000s  |
| `#IDs`                                                                  | 100s   |
| `.classes`, attribute-selectors (`a[href="home"]`) or `:pseudo-classes` | 10s    |
| Element selectors                                                       | 1s     |

These numbers are added, so a rule like

```css
#button .primary a:hover {
  color: green'
}
```

would have a score of 121.

### Source Order

Simply put: Later rules in the stylesheet override earlier ones *with the same score*.

Also, different stylesheets have different priorities. For example, the author stylesheet has a higher priority than the user agent stylesheet (that's the reason CSS resets can exist).

| Rank | Origin         | Importance       |
| ---- | -------------- | ---------------- |
| 1    | user agent     | normal           |
| 2    | user           | normal           |
| 3    | author         | normal           |
| 4    | CSS Animations | it's complicated |
| 5    | author         | `!important`     |
| 6    | user           | `!important`     |
| 7    | user-agent     | `!important`     |

(A higher rank means higher priority)

### Further Reading

* <https://developer.mozilla.org/en-US/docs/Web/CSS/Cascade>
* <https://developer.mozilla.org/en-US/docs/Learn/CSS/Introduction_to_CSS/Cascade_and_inheritance>


# Git


# git

## Reverting a single file to a specific commit

First, we'll need to find the hash of the commit that we want to revert to. This can be done via

```bash
> git log -p filename
```

When we know the hash, we checkout the desired file to the desired hash:

```bash
> git checkout [hash] -- path/to/file
```

## Useful commands

### Remove local branches that have been deleted in the remote repository

`git fetch --prune` removes any remote-tracking references that no longer exist on the remote before fetching.

### Temporarily ignoring files

There are cases where you want to temporarily ignore files, but do not want them to be untracked in general (i.e. if you and your team aggreed to not check in `schema.rb` files in Pull Requests in a rails project). To acheive that, just run

```
git update-index --assume-unchanged <file>
```

If you later want to track this file again (i.e. when you are checking out master), run

```
git update-index --no-assume-unchanged <file>
```

### Undo the last commit but keep the changes

Sometimes, I do commit changes I did, but only want to do so temporarily. This is the case, for example, when wanting to change a branch, but having changes in the current branch, where `git stash` is not an option (e.g. because there are untracked files present).\
To undo this commit, simply use

```
git reset HEAD^
```

### Check in changes in filename casing

When changing the casing of a file, git does (under certain circumstances) not recognize the changes. To get the changes checked in, there is a simple workaround.\
Assuming the file `Myfile.txt` was changed to `myfile.txt`, you can

1. Rename the file to something entirely new (`mv myfile.txt myfile_tmp.txt`) &#x20;
2. Check that new file in (`git add myfile_tmp.txt`) &#x20;
3. Name the file back to the originally inteded name (`mv myfile_tmp.txt myfile.txt`) &#x20;
4. Check the file in again (`git add myfile.txt`) &#x20;

Git should now recognize the changed casing in the filename.


# business


# concepts

The following is a list of concepts that are somewhat related to either business ideas or productivity in general. As of now, there is not enough content in this document to justify splitting it in business and productivity

## Contents

* [Parkinson's Law](/business/concepts#parkinsons-law)
* [80/20 Rule](/business/concepts#the-8020-rule)

## Parkinson's Law

> work expands so as to fill the time available for its completion

There are multiple interpretations on the law, but the above one is the most important to me. While I belive the law is true, I also belive thatyou cannot give a task just one minute to be completed and expect it to be completed in one minute. On the other hand, if you give it an hour longer to be completed than it would need, it will take an hour longer.\
A practical approach here might be to calculate the duration of tasks as short as possible and than adapt if the task was not finished in the given time.

### Resources and Material

* [Wikipedia Entry](https://en.wikipedia.org/wiki/Parkinson's_law)
* [How to Use Parkinson's Law to Your Advantage](http://www.lifehack.org/articles/featured/how-to-use-parkinsons-law-to-your-advantage.html)
* [The 4 Hour work week](https://www.amazon.de/4-Hour-Work-Week-Escape-Anywhere/dp/0091929113/ref=sr_1_sc_1?ie=UTF8\&qid=1517158086\&sr=8-1-spell\&keywords=4+hour+workwwek) - by Tim Ferriss

## The 80/20 Rule

The 80/20 Rule can be applied to almost everything in live and is very flexible in implementation. Some examples include:

* 20% of the work produce 80% of the outcome
* 20% of the events produce 80% of the stress
* 20% of the customers produce 80% of the revenue

Generally, its good to identify the 20s and 80s in a System and then adapt to that (by cutting out unperformatn factors that are not in the 20%)

### Resources and Material

* [Wikipedia Entry](https://en.wikipedia.org/wiki/Pareto_principle)


# databases


# PostgreSQL

## What's the default `username` and `password` for a PostgreSQL database?

```
username: postgres
password: password
```


# dev-ops


# Docker

## `docker-compose`

## Commands

* Starting and running a container in the background

  ```
  $> docker-compose up -d
  ```


# heroku

This living document provides a list of useful snippets reagarding working with [Heroku](https://github.com/Plsr/knowledge/tree/a219f0a2771e15a042b8deaaed2acb7648c5661a/dev-ops/heroku.com) as well as so guidance for problems I faced myself and and want to be able to solve faster the next time I encounter them.

## Content

* [Basic Resources](/dev-ops/heroku#basic-resources)
* [Situations](/dev-ops/heroku#situations)

## Basic Resources

* [**Heroku DevCenter**](https://devcenter.heroku.com/categories/reference) The Heroku DevCenter provides guidance to basically everything that can be done with Heroku.
* [**Heroku CLI Commands**](https://devcenter.heroku.com/articles/heroku-cli-commands) or `heroku help`

## Situations

### Deploying a rails app with pending migrations

Remember that heroku does not run database migration for raisl applications automatically whil deploying (at least, not by default). You might encounter errors in the deployed version that are due to missing database migrations.\
To run migrations from the CLI: `heroku run rails db:migrate --app your-heroku-application-name`[1](/dev-ops/heroku#footnote1)\
Afterwards, you app still might be not functioning correct, because it is in a transient state, database-wise. Usually, a restart of the app should fix this. To restart the app, go to the web interface or run `heroku ps:restart --app your-heroku-application-name`.

### Deploying to heroku with an existing app and soruce code cloned from github

It really is as simple as adding heroku to the repositories remotes: `heroku git:remote --app your-heroku-application-name`. You can verify this by running `git remote -v`:

```
heroku    https://git.heroku.com/your-heroku-application-name.git (fetch)
heroku    https://git.heroku.com/your-heroku-application-name.git (push)
origin    git@github.com:user/repository.git (fetch)
origin    git@github.com:user/repository.git (push)
```

#### Resources

* [This](https://stackoverflow.com/questions/5129598/how-to-link-a-folder-with-an-existing-heroku-app) Stack Overlow Question

[1](/dev-ops/heroku): Make sure you use the Heroku name of your application, not the one that you ight have used on your local filesystem. If you are not sure what the app name is, check the Heroku Web-Interface or run `heroku apps`


# javascript


# javascript

### General Concepts

#### Reference vs. Value

(*The following is basically a short version of* [*this article*](https://codeburst.io/explaining-value-vs-reference-in-javascript-647a975e12a0))

Primitives are accessed directly. Primitives are:

* `String`
* `Number`
* `Boolean`
* `null`
* `undefined`

Other data types are passed by reference (and handled as Objects in JavaScript):

* `Array`
* `Function`
* `Object`

When a primitive is assigned to a variable, its value is *copied*. For example:

```JavaScript
var x = 10
var a = x
var x = 'abc'

console.log(x) // => 'abc'
console.log(a) // => 10
```

Changes made to `x` after assigning `x` to `a` are not reflected in `a`, because its value copied and the variables have no connection whatsoever to on another.

In contrast, Objects are references to an address. If an Object is assigned to a variable, that variable contains a *reference* to the address of the Object. Therefore, changes made to the object are reflected in all variables referencing that address.

```JavaScript
function invalidatePerson(person) {
	person.valid = false
}

var jenkins = {
	age: 25,
	valid: true
}

var invalidPerson = invalidatePerson(jenkins)

console.log(jenkins.valid) // => false
console.log(invalidPerson.valid) // => false
```

#### [What is a pure function?](https://medium.com/javascript-scene/master-the-javascript-interview-what-is-a-pure-function-d1c076bec976#.8h1rzm6vi)

A pure function in JavaScript is a function with no side effects, everytime you call it with the same arguments it returns the exact same result. Common disqualifiers for a pure function are Methods like `Math.random()` and `Date.now()` being called. I the function has to manupilate an object, it has to manipulate a copy of it to not manipulate the external state.

### Useful things

#### [`console.table`](https://developer.mozilla.org/en-US/docs/Web/API/Console/table)

Useful to print out complexer data structures. (Non Standard)

#### [Template Literals](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals)

String literals that allow embedded expressiosn:

```javascript
console.log("The result is ${result * 2}");
```

#### Sum of an array

There is no native `sum()` function on JavaScript arrays, so the sum has to be calculated by hand somehow. There is the method `reduce()` on array, though.

> The reduce() method applies a function against an accumulator and each element in the array (from left to right) to reduce it to a single value.

So, to sum the values of an array, we can simply use `reduce()` in a way like this (ES6 Syntax):

```JavaScript
const array = [1, 2, 3, 4]
const arraySum = array.reduce((sum, value) => sum + value, 1)
console.log(arraySum) // -> 10
```

[Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce?v=b)

#### Create a unique array

Given the array

```
const arr = [0, 0, 0, 1, 2, 3, 3, 3, 4]
```

using `Set` we can create an array with only unique values in it

```
const uniqueArr = [...new Set(arr)] // [0, 1, 2, 3, 4]
```


# Jest

## Spying in automaitc `node_module` mocks

When you want to spy on methods of a module that was automatically mocked (via a file in the `__mocks__` folder that was named after the module), jest will complain. To be able to do so, you can export the functions you want to spy on from said file.

Following is an exmple of a mock for `react-native-keychain`:

```javascript
// __mocks__/react-native-keychain.js
export const setInternetCredentials = jest.fn()
export const getInternetCredentials = jest.fn()
```

This would allow us to do something like `expect(Keychain.setInternetCredentials).toHaveBeenCalledTimes(1)`

**Note:** `react-native-keychain` does not have a default export. This is why we are exporting seperate `const`s here. For a module with a default export, we would have to adapt accordingly.


# Readme

Some knowledge about ReactJS I picked up on the way.

* [General](https://github.com/Plsr/resources/blob/master/JavaScript/ReactJS/General.md)
* [Libraries](https://github.com/Plsr/resources/tree/master/JavaScript/ReactJS/Libraries)


# General

## [Adding a Favicon to your Application](https://serverless-stack.com/chapters/add-app-favicons.html)

Basically the same as adding a favicon to every other static site. Generate the favicon files and place them in the `/public` folder. Then include them in the `public/index.html`.\
Since they are placed in the public folder, the `href`s in the `<link>` tags do need the `%PUBLIC_URL%` prefix to locate the files.


# Libraries


# React\_DnD

This is a writeup of the general concepts and most important interfaces of the [React D'nD library](https://github.com/react-dnd/react-dnd), which implements Drag & Drop in React.

**Disclaimer: This is a writeup for myself, just in case I forget everyting again in 2 Months. It is neither a tutorial for the library, nor a replacement for reading the** [**documentation**](https://react-dnd.github.io/react-dnd/)**.**

## Backends

*TBD*

## Items & Types

*TBD*

## Monitors

*TBD*

## Connectors

*TBD*

## Drag Sources & Drop Targets

*TBD*


# npm


# npm cheatsheet

I often find myself googling for the same commands every few weeks. This is a collection of theses things so I do find them quicker.

* [`npm docs <package>`](https://docs.npmjs.com/cli/docs.html)\
  Navigate to the documentation of the given package (usually the npm or GitHub Repository)
* `npm init -y`\
  Quickly initialise a new npm project without answering all the quesitons. Resulting `package.json` looks like this:

  ```json
    {
      "name": "<PWD>",
      "version": "1.0.0",
      "description": "",
      "main": "index.js",
      "scripts": {
        "test": "echo \"Error: no test specified\" && exit 1"
      },
      "keywords": [],
      "author": "",
      "license": "ISC"
    }
  ```


# people


# Active Listening

* <https://www.youtube.com/watch?v=qXjgpYevUww>
  * Be present in the conversation
  * Repeat back to the person in a short and casual way what you just understood they said
  * Emotion labelling
    * “It sounds like you have a hard time”
    * “I guess you’re happy this is over”
  * “You can make more friends in two months by becoming interested in other people than you can in two years by trying to get other people interested in you.” - Dale Carnegie


# productivity


# focus

I believe that good work can only happen when you focus. I use several techniques and procedures to be able to focus.

* Plan ahead, not on the fly. Preferrably, plan the whole day the day before, but even if it comes down to planning hte next hours, that's okay. But do not plan whil focussing.
* When choosing what to do next, pick the most urgent thing (sometimes has a

  strong correlation with importance)
* A good rule of thumb is to pick the item that makes me the most uncomfortable.
* Do one thing only. Focus on that thing. Do not multi-taks. It does not work.
* If a distractions comes up, decide if I need to act on it right away. If not,

  write it down. Decide what to do about it after the session.


# reviews

I like to refelct on what I am doing on a regular basis. This has proven useful to me to keep track of what I am doing in the mid- and long-term and work out which things work well for me and which don't.\
I generally reflect on three levels:

* Daily
* Weekly
* Monthly

For this year, I would also like to take a longer retreat and reflect on the past year.

## Daily

I keep track of what I achieved in a day in a diary post in vimwiki. These are just a handful of bullet points, mostly (but not exclusively) work related. I write those every evening. Sometimes, days can feel like you did not achieve anything at all. Reflecting for 5 Minutes and seeing what you actually did is very fulfilling.\
I also maintain a note in Notes.app for every month with subsections for every day where I write done more generic observations and thoughts.\
Both of these are good to re-read in the weekly review.

## Weekly

Every Sunday, I refelct on how my week went. I check if I did accomplish everything I did plan the sunday before, reflect on how the week went in gerneral, what I could do better and what I want to keep on doing.\
For every week, I maintain a page in my vimwiki, again with bullet points about the week.\
At the end, I define some goals for the next week.

## Monthly

One level up from the weekly review, I check how my months went. The reviews are similar, but with broader goals. Instead of reviewing my daily notes, I review my weekly notes.


# reading-log

I think reading is one of the most important habits I build over the past few years. I try to always read two books: Nonfition over the day and fiction in the evening to calm me down and get my mind ready to sleep.

To remember myself what I learned from each book, I keep this reading log. It contains short summaries of all the books I read for nonfiction books.\
For fiction books, I write my opinion rather than learnings. At times, I write reviews on third paty sites, so I might also just link to those.


# 12 Rules for Life

Author: Jordan B. Peterson

{% hint style="info" %}
**Work in progress** I'm still reading this book and adding notes as I read
{% endhint %}

## Foreword

* People need shared belief systems in order to be able to trust their peers. A shared belief system makes people predictable. People will generally go to extreme measures (i.e. Cold War) in order to protect their belief system.
* Humans need to be part of a group but also keep their individualism. Not being part of a group is chaos. Being no individual is nihilism. We want to move on the intersection of both.
* "If we each live properly, we will collectively flurish"


# nonfiction

Some of the following books I read on [Blinkist](https://www.blinkist.com/). Those are marked as such

## How to Fix a broken Heart

*Author: Guy Winch*

*I read this on blinkist*

* A heartbreak hurts, badly.
* Heartbreak will trigger the same reaction as physical pain would in our

  brain (also: bad physical pain, decribed as "unbearable", like touching a hot

  oven plate).
* Do not search the reasons for the breakup in yourself if there is nothing you

  did wrong.
* Don't get hung up on negative thoughts. Mindful meditation can help with that.
* Don't idealize your ex partner!


# ruby-on-rails


# Active Storage

Active Storage is a way to handle file uploads at ease that was introduced in Rails 5. It makes uploading and processing files in your rails applications reallystraight forward.

## Resize and crop an avatar image to a square

```ruby
image_tag user.avatar.variant(combine_options: {resize: '256x256^', extent: '256x256', gravity: 'Center'})
```

[Source](https://grosse.io/blog/posts/ActiveStorage-avatar-image-with-resize-crop)


# bundler

\#Bundler

### Updating gems

To only update a specific gem, use

```bash
bundler update gem
```

The command also accepts a list of gems to be updated.\
Also accepts the `--conservative` flag to make sure that no indirect dependencies are updated.


# file-io

Things regarding the input and output in a rials application.

## Table of Contents

* [Importing CSV Files](/ruby-on-rails/file-io#importing-csv-files)

## Importing CSV Files

Rails has a lot of support built on for handling CSV (both, in- and output), have a look at the [CSV Class](https://ruby-doc.org/stdlib-2.0.0/libdoc/csv/rdoc/CSV.html).

While importing CSV Files, the most memory-efficient method is to use `CSV.foreach()`, which reads the file line per line (see [this article](https://dalibornasevic.com/posts/68-processing-large-csv-files-with-ruby) for more information about the performance of importing CSV files).


# Migrations

## Create a new model

```ruby
  class CreateMyModel < ActiveRecord::Migration[6.1]
    def change
      create_table :my_table do |t|
        t.string :name
      end
    end
  end
```

## Rollback multiple steps

Can be achieved using the `STEP` variable:

```shell
rails db:rollback STEP=2
```

will roll back the last two migrations


# patterns

A list of patterns I learned that come around useful. Incomplete and wildy unorganised.

## Returning early from controller actions

There are certain situations in which you might want to return early from a controller actions, for example, if you want to make sure a user is allowed to see a certain resource. If a user is not allowed to see said resource, you may want to redirect them somewhere else. `redirect_to` does not stop the execution of a function though, so this has to be done manually.\
The most basic way to do that is to use `and return`, however, `validate_access_rights and return` does not read very well.

Robert Pankowecki introduces 4 possible ways to return early in [his article](https://blog.arkency.com/2014/07/4-ways-to-early-return-from-a-rails-controller/), the most elegant of which is the foruth: `extracted_method; return if performed?`.

```ruby
class Controller
  def show
    verify_something; return if performed?
    @instance_var = Model.find(params[:id])
  end

  private

  def verify_something
    if not_valid?
      redirect_to some_path and return
    end
  end
```

**Further Reading**

* [Rails redirect\_to documentation](https://api.rubyonrails.org/classes/ActionController/Redirecting.html#method-i-redirect_to)
* [preformed? documentation](https://apidock.com/rails/ActionController/Metal/performed%3F)

## Memoization

The basic idea here is to cache results of methods to that these methods do not have to be executed over and over again, yielding the same results.\
Basic memoization can look like this:

```ruby
class Article < ActiveRecord::Base
  def comments
    @comments ||= article.comments
  end
end
```

*Obviously, this example is very constructed and just used to display the syntax*

**Further Reading**

* [4 Simple Memoization Patterns in Ruby (And One Gem)](https://www.justinweiss.com/articles/4-simple-memoization-patterns-in-ruby-and-one-gem/)


# rake-tasks

## List all rake tasks defined for a project

To list all the rake tasks defined in a project, run

```
rails -T
```

from the project root.


# views

Everything that is remotely connected to views in a Rails application.

## Table of Contents

* [Forms](/ruby-on-rails/views#forms)
  * [Form Basics](/ruby-on-rails/views#form-basics)
* [Partials](/ruby-on-rails/views#partials)
  * [Default values for partial locals](/ruby-on-rails/views#default-values-for-parial-locals)

## Forms

### Form basics

Generating basic forms be done with the `form_tag`, however, this will lead to a lot of manual work that rails can handle. Should you be in a situation where you cannot use the form builder and need to build a form by hand, railsgiudes [has you covered](http://guides.rubyonrails.org/form_helpers.html#dealing-with-basic-forms).\
The following will handle the creation of forms with the form builder.

Often times when working on a rails application and dealing with forms, chances are you want to modify or create a resoucrce (in the 'new' and 'edit' view for example). To make that easier, we can make use of the form builder, by using `form_for` to generate our form.\
Let's assume we have an `Article` model that has fields for a title and content. We can than pass an instance of that model to `form_for`, which will yield a form builder object (passed to the block as `f` in the example below) which will handle a lot of work for us.

```ruby
= form_for @article, url: {action: "create"} do |f|
  = f.text_field :title
  = f.text_field :content
  = f.submit "Create"
```

If we had defined artilces as a resouce in our routes, we could even use

```ruby
= form_for @article do |f|
  = f.text_field :title
  = f.text_field :content
  = f.submit "Create"
```

and rails will figure out if we are generating a new record or modifying an exiting.

## Partials

### Default values for partial locals

First things first: I feel like setting default values for locals in partials should not be happening in any production application. I think this kind of logic does not belong into the view, especially not in a partial.

Nonetheless, there are situations where it is ~~needed~~ more convenient to set the value of a local inside the partial. This happened for example in a heavily mocked prototype that was just used for internal demoing pruposes to me lately.\
Thinking about it now, I feel like I could probably have found a better solution for this as well, without too much effort. But nonetheless, should I ever again need to do this, I'll write it down here.

The approach is rather simple: Every local passed to a partial can be accessed via the `local_assigns` hash. So basically all we have to do is to check if the key we want to set a default value is present and set the default value if it's not the case.\
There are multiple approaches to this, but I liked the following the most for its reability (even though it's kind of long):

```ruby
- default_value = "default_value" if local_assigns[:default_value].nil?
```

#### Further reading

* There are a lot of different approaches in [this Stack Overflow Question](https://stackoverflow.com/questions/2060561/optional-local-variables-in-rails-partial-templates-how-do-i-get-out-of-the-de)


# stoicism


# Notes

This page is a (rather unstructured) list of notes I took on stoicism. While I am not sure where exactly each not comes from, here is a list of likely places of origin:

* The daily emails fom [The Daily Stoic](https://dailystoic.com/)
* Somehwere form [r/soticism](https://www.reddit.com/r/Stoicism/)
* From the book "The Daily Sotic"

## The actual notes

* Is the voice in your head getting nicer? Are you more still? Are you practicing good self-care? That’s what progress looks like. That’s what you deserve as a human being—and as a friend.
* Do Less, better. Stop trying to do everything, just do what is essential. It will make you calmer and also bring the satisfaction of doing the essential things with more care, better.
* “What he was basically saying is that on the other side of difficulty is a gift—confidence. Simply *believing* that you’re capable of things you’ve never actually done or experienced, simply believing that you’re special and important without any evidence? Folks, that’s not your friend. That’s delusion!”
* We need to look for common ground and use it. We need to see the good in other people and in other ideas and ignore the rest, whenever possible.
* Yet too many of us reject that gift. We continue to think of long ago. We dream of or fear a distant future. We are distracted or preoccupied and miss what is happening around us. It’s the quiet evenings at home with family that we should be present for. It’s the ordinary present that we should cherish.
* Beautiful choices—like physical fitness or perfect skin—are rarely as effortless as they seem. No, there is a regimen behind them. It takes exercise, it takes discipline, it takes sacrifice.
* Don’t let your happiness depend on something you may lose.
* “Whenever you do something you have decided ought be done, never try to avoid being seen doing it, even if people in general may disapprove of it. If, of course, your action is wrong, just don’t do it at all, but if it’s right, why be afraid of people whose criticism is off the mark?”
* Talk less, listen more
* Whish for the hard things to happen instead of fearing them, for those things help you lern and grow. They are opportunities, not punishments.


# food-drink


# coffee


# Coffee Beans

All things coffee beans

## List of coffee beans I tried

### [Mexico by Moxxa](https://www.moxxacaffe.net/de/mexiko.html)

Local coffee from cologne, so that's already a plus.

👍


# tools


# macOS


# Things

I use Things to keep track of all my daily todos and longer lasting projects I started. Sometimes, the content between Things and a Trello board can be duplicate, but they serve different purposes.\
Things gives me a lower level view of next actions I can take. Trello is giving me a higher level overview of what needs to be done to achieve something. Usually, cards in Trello will be more documented than tasks in Things. A task in Things is more of a reminder for me to do something on a specific date.

I also try to use a GTD like approach whil using things. Usually, everything I have on my mind starts here as a task in my inbox, because I always have a device with me that has access to things.

## Keyboard Shortcuts

* `CTRL + <Assigned Key>` - Add a Tag to a task (Tag has to be given a shortcut in the Tag window first)

## Useful links

* [Full list of Things 3 Keyboard Shortcuts](https://support.culturedcode.com/customer/en/portal/articles/2785159-keyboard-shortcuts-for-mac)


# services


# Trello

Trello is a digital implementation of a kanban baord. Well, it can be. It can also be anything else you can imagine, as long as it has lists and tasks. I use it for a variety of things, mostly to keep track of ideas and to manage projects.

## Shortcuts

* `Q` - Only show cards assigned to you


