Notes
This is a place for some personal notes. I try to use the zettelkasten method. Thats should help me to summarize all the input that I’m reading day by day. My workflow is dead simple with obsidian (nvim) and a synchronised folder to my private nextcloud and a github repository for converting all the notes to a mdBook. On my mobile (iPhone) actually I prefer to use obsidian (mobile) for editing my markdown files and sync these via WebDAV on my Nextcloud.
Interesting knowledges:
Another topic about publishing your notes: digital-garden
See Also
See meta-knowledge for other lists by people who also record stuff on GitHub.
License
Chat bots
Search engine
Block ai crawler on your website
Add some files to your root dir to block ai web crawler from your website.
Add robots.txt
with this content:
User-agent: AdsBot-Google
Disallow: /
User-agent: Amazonbot
Disallow: /
User-agent: anthropic-ai
Disallow: /
User-agent: Applebot
Disallow: /
User-agent: AwarioRssBot
Disallow: /
User-agent: AwarioSmartBot
Disallow: /
User-agent: Bytespider
Disallow: /
User-agent: CCBot
Disallow: /
User-agent: ChatGPT-User
Disallow: /
User-agent: ClaudeBot
Disallow: /
User-agent: Claude-Web
Disallow: /
User-agent: cohere-ai
Disallow: /
User-agent: DataForSeoBot
Disallow: /
User-agent: Diffbot
Disallow: /
User-agent: FacebookBot
Disallow: /
User-agent: FriendlyCrawler
Disallow: /
User-agent: Google-Extended
Disallow: /
User-agent: GoogleOther
Disallow: /
User-agent: GPTBot
Disallow: /
User-agent: img2dataset
Disallow: /
User-agent: ImagesiftBot
Disallow: /
User-agent: magpie-crawler
Disallow: /
User-agent: Meltwater
Disallow: /
User-agent: omgili
Disallow: /
User-agent: omgilibot
Disallow: /
User-agent: peer39_crawler
Disallow: /
User-agent: peer39_crawler/1.0
Disallow: /
User-agent: PerplexityBot
Disallow: /
User-agent: PiplBot
Disallow: /
User-agent: scoop.it
Disallow: /
User-agent: Seekr
Disallow: /
User-agent: YouBot
Disallow: /
Add .htaccess
with this content:
Order Allow,Deny
# Anthropic Claude - https://docs.anthropic.com/en/api/ip-addresses
Deny from 160.79.104.0/23
Deny from 2607:6bc0::/48
# OpenAI ChatGPT - https://platform.openai.com/docs/plugins/bot/ip-egress-ranges
Deny from 23.98.142.176/28
Deny from 40.84.180.224/28
Deny from 13.65.240.240/28
Deny from 20.161.75.208/28
Deny from 52.225.75.208/28
Deny from 52.156.77.144/28
Deny from 40.84.180.64/28
Allow from all
Source: anreiter.at
Prompts
- colouring template (Malvorlage)
coloring book for kids, no detail, outline no colour, <MOTIV>, fill frame, edge to edge, clipart white background --ar 3:2 --style raw --no color
- code changes summary
You are an expert developer specialist in creating commits.
Provide a super concise one sentence overall changes summary of the user \`git diff\` output following strictly the next rules:
- Do not use any code snippets, imports, file routes or bullets points.
- Do not mention the route of file that has been change.
- Simply describe the MAIN GOAL of the changes.
- Output directly the summary in plain text.
- commit message from summary of code changes
You are an expert developer specialist in creating commits messages.
Your only goal is to retrieve a single commit message.
Based on the provided user changes, combine them in ONE SINGLE commit message retrieving the global idea, following strictly the next rules:
- Always use the next format: \`{type}: {commit_message}\` where \`{type}\` is one of \`feat\`, \`fix\`, \`docs\`, \`style\`, \`refactor\`, \`test\`, \`chore\`, \`revert\`.
- Output directly only one commit message in plain text.
- Be as concise as possible. 50 characters max.
- Do not add any issues numeration nor explain your output.
Pass 🔐
Favorite app on phone, also on terminal is pass.
Troubleshooting
SSH key import on iPhone fails issue Generate your ssh key without following command:
ssh-keygen -t rsa -b 2046 -m PEM -f ./secret.key
VIM/NEOVIM 💓
Some useful keybindings and many more for my favorite editor.
Articles
Some interesting blog posts:
- Vim for advanced users
- History and effective use of Vim
- Seems kinda good for macOS kindavim.app
Copilot (docker)
If you wanna try copilot:
docker run --name copilotcontainer -it debian:sid-slim
apt update && apt upgrade -y
apt install -y neovim nodejs git
git clone https://github.com/github/copilot.vim.git ~/.config/nvim/pack/github/start/copilot.vim
vim
# Now in vim type:
# :Copilot setup
# And then hit enter
# The plugin will display a token.
# Open a browser and paste the code on https://github.com/login/device
# After a few moments, the plugin will finish the setup
# Now exit vim
# Exit the container
docker commit copilotcontainer copilot
docker rm copilotcontainer
## All done
# From now on, you can use the copilot container with:
# docker run --rm -it copilot
Source: gibney
Settings
- TypeScript environment Great article to this topic from Jose Alvarez | medium
- Lua config Different stuff from oroques icyphox
Print mapping
:redir! > vim_keys.txt
:silent verbose map
:redir END
Generate random secure string
:r! openssl rand -base64 12
Format json
Reformat json with :%!jq .
Macro
If you record a macro with qa
and forget something, just with qA
you could append some keystrokes to your macro.
Source: A vim guide for advanced user
Registers
To put a register in insert mode, just do CTRL+R <register>
Source: A vim guide for advanced user
Global command
To delete lines with a pattern:
" delete line
:g/useless/d
" make line lowercase
:g/useless/norm gu$
Source: A vim guide for advanced user
Completion
In insert mode:
ctrl+x ctrl+f complete filenames
ctrl+x ctrl+l complete lines
ctrl+r <register> insert text from register (i.e.: . for last text [ctrl+a])
Visual mode
Selects the previous visual
gv
Go to other end of visual block
v_o/v_0
Increment numbers
CTRL-A inc by one
g CTRL-A inc by sequence
2g CTRL-A inc two by sequence
Blockwise motion
d2j delete 2 lines
d<CRL-V>2j delete 2 chars in that column
Ex commands
Run command for regex
:g/regex/ex
Run comman in norm mode
:g/regex/norm f dw
Source: hillelwayne/intermediate-vim
Commands in insert mode
Ctrl-h - delete back one character (just like Backspace)
Ctrl-w - delete back one word
Ctrl-u - delete back to the start of line or the start of current insert
Talking about Insert mode - did you know that you can paste yanked text without moving to Normal mode? You can do that with
Ctrl-r 0
Source: [Jovica - Mastering Vim Quickly #127]
Vim and shell
Run command from vim
:!{cmd}
Read output form command
:r !{cmd}
insert output on line 3:
:3read !curl --silent ifconfig.me
write as input to command
:[range]write !{cmd}
:'<,'>write !python
Source: vim and the shell
Splits
Splits are very useful i.e. in vimdiff. So here some keybindings.
Source: thoughbot.com
Help: :help splits
& :help CRTL-W
More natural splits opening
Open new split panes to right and bottom, which feels more natural than Vim’s default:
set splitbelow
set splitright
Resizing splits
Vim’s defaults are useful for changing split shapes:
"Max out the height of the current split
ctrl + w _
"Max out the width of the current split
ctrl + w |
"Normalize all split sizes, which is very handy when resizing terminal
ctrl + w =
More split manipulation
"Swap top/bottom or left/right split
Ctrl+W R
"Break out current window into a new tabview
Ctrl+W T
"Close every window in the current tabview but the current one
Ctrl+W o
Obsidian
A collection of obsidian specific styling and configurations, that Im using in my vault.
Checkboxes
- [ ] Unchecked
- [X] Checked
- [-] Dropped
- [>] Forward
- [D] Date
- [?] Question
- [/] Half Done
- [+] Add
- [R] Research
- [!] Important
- [i] Idea
- [B] Brainstorm
- [P] Pro
- [C] Con
- [Q] Quote
- [N] Note
- [b] Bookmark
- [I] Information
- [p] Paraphrase
- [L] Location
- [E] Example
- [A] Answer
- [r] Reward
- [c] Choice
- [d] Doing
- [T] Time
- [@] Character / Person
- [t] Talk
- [O] Outline / Plot
- [~] Conflict
- [W] World
- [f] Clue / Find
- [F] Foreshadow
- [H] Favorite / Health
- [&] Symbolism
- [s] Secret
- [x] Regular
- Unchecked
- Checked
- [-] Dropped
- [>] Forward
- [D] Date
- [?] Question
- [/] Half Done
- [+] Add
- [R] Research
- [!] Important
- [i] Idea
- [B] Brainstorm
- [P] Pro
- [C] Con
- [Q] Quote
- [N] Note
- [b] Bookmark
- [I] Information
- [p] Paraphrase
- [L] Location
- [E] Example
- [A] Answer
- [r] Reward
- [c] Choice
- [d] Doing
- [T] Time
- [@] Character / Person
- [t] Talk
- [O] Outline / Plot
- [~] Conflict
- [W] World
- [f] Clue / Find
- [F] Foreshadow
- [H] Favorite / Health
- [&] Symbolism
- [s] Secret
- Regular
Admonitions
[!recite|color-blue] test
Callouts
can callouts be nested?
[!todo] Yes!, they can.
[!example] You can even use multiple layers of nesting.
Firefox
Settings
Make changes in about:config
:
- Deactivate js for pdf preview:
pdfjs.enableScripting = false
- Show tab close button
browser.tabs.tabClipWidth = 1
- Localhost subdomain
network.dns.localDomains
and add the entries (comma separated)
Extensions
- Vimium: vim motion
- uBlock: block ads
- Reedy: read faster
- Mate translate: translate on doubleclick
- Stylus: custom css style (darkmode)
Bash
Some bash file recommendations:
#!/usr/bin/env bash
set -euo pipefail
[[ "${BASH_VERSINFO[0]}" -lt 4 ]] && die "Bash >=4 required"
function installed {
cmd=$(command -v "${1}")
[[ -n "${cmd}" ]] && [[ -f "${cmd}" ]]
return ${?}
}
function die {
>&2 echo "Fatal: ${@}"
exit 1
}
deps=(curl nc dig)
for dep in "${deps[@]}"; do
installed "${dep}" || die "Missing '${dep}'"
done
# Code blocks aren't subshells, so `exit` works as expected
risky-thing || { >&2 echo "risky-thing didn't work!"; exit 1; }
Another pretty nice template: Source
#!/usr/bin/env bash
set -Eeuo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1
trap cleanup SIGINT SIGTERM ERR EXIT
usage() {
cat <<EOF
Usage: $(basename "$0") [-h] [-v] [-f] -p param_value arg1 [arg2...]
Script description here.
Available options:
-h, --help Print this help and exit
-v, --verbose Print script debug info
-f, --flag Some flag description
-p, --param Some param description
EOF
exit
}
cleanup() {
trap - SIGINT SIGTERM ERR EXIT
# script cleanup here
}
setup_colors() {
if [[ -t 2 ]] && [[ -z "${NO_COLOR-}" ]] && [[ "${TERM-}" != "dumb" ]]; then
NOCOLOR='\033[0m' RED='\033[0;31m' GREEN='\033[0;32m' ORANGE='\033[0;33m' BLUE='\033[0;34m' PURPLE='\033[0;35m' CYAN='\033[0;36m' YELLOW='\033[1;33m'
else
NOCOLOR='' RED='' GREEN='' ORANGE='' BLUE='' PURPLE='' CYAN='' YELLOW=''
fi
}
msg() {
echo >&2 -e "${1-}"
}
die() {
local msg=$1
local code=${2-1} # default exit status 1
msg "$msg"
exit "$code"
}
parse_params() {
# default values of variables set from params
flag=0
param=''
while :; do
case "${1-}" in
-h | --help)
usage
;;
-v | --verbose)
set -x
;;
--no-color)
NO_COLOR=1
;;
-f | --flag) # example flag
flag=1
;;
-p | --param) # example named parameter
param="${2-}"
shift
;;
-?*)
die "Unknown option: $1"
;;
*)
break
;;
esac
shift
done
args=("$@")
# check required params and arguments
[[ -z "${param-}" ]] && die "Missing required parameter: param"
[[ ${#args[@]} -eq 0 ]] && die "Missing script arguments"
return 0
}
parse_params "$@"
setup_colors
# script logic here
msg "${RED}Read parameters:${NOCOLOR}"
msg "- flag: ${flag}"
msg "- param: ${param}"
msg "- arguments: ${args[*]-}"
Basic
Books
- Structure and Interpretation of Computer Programs
- Is Parallel Programming Hard, And, If So, What Can You Do About It?
- Interactive Linear Algebra
Atomic design
A programming pattern that divides components into different chemical stages to allow reusability as much as possible. Mostly useful for frontend design.
- Atoms
- Molecules
- Organisms
- …
Source: Brad Frost
Coding style
At the linux kernel guideline are some good advices: The linux kernel - coding style Google have some guidelines for some languages as well. Use positive booleans for better readability, like described here | Google Code health
Principles
- YAGNI
- stop thinking about future possible mutation of your actual requirements, just let it simple
Code review
-
Be kind! People are more receptive to feedback if you assume competence and treat them with respect.
-
Focus your comments on the code, not the author. Avoid statements with the word ‘you’ which can give the impression that you are judging the person and not the artifact.
-
Explain why you are making the comment. You may be aware of alternatives that are not obvious to the author, or they may be aware of additional constraints.
-
Express the tradeoffs your suggestion entails and take a pragmatic approach to working with the author to achieve the right balance.
-
Approach your role as a guide, not a test grader. Balance giving direct guidance with leaving some degrees of freedom for the author.
-
Consider marking low priority comments with severity like Nit, Optional, or FYI to help the author prioritize the important ones.
Source: Google testing blog
Environment
Development on a virtual-server (docker)
Try to develop my daily projects within the vitualServer with docker and traefik as proxy for localhost.
Source:
General
Software development workflow
Some of my favourite tools and routines I using in my development environment.
Terminal
- Terminal emulator (fast, minimal, gpu based): kitty
- Multiplexer (Window/Session management): TMUX
- Shell: ZSH
Coding (IDE)
Window Management
Password management
- Self-hosted password manager (Browser & App) vaultwarden
Tools
PKM (knowledge base)
GIT Versioning tool for developers
my daily most used commands
Reducing size of git repository with git-replace
For reporitories with a huge history it takes a long time to clone this whole git overhead.
It relativy easy to spilit your history from one commit to a completly other repository.
- Create new repository (destination for your old history)
- Add this repository url to your huge repo:
git remote add project-history C:\repos\git-replace\history
- Create a history branch from your latest commit (first commit of history repo)
git branch history 590f4d3
- Push this branch to history-repo
git push project-history history:main
- Reduce size of main repo
git commit-tree -m "For historic commits, run 'git replace <child-ID> 590f4d3'" "590f4d3~^{tree}" d3bee05dac84c66b7d13f99a5edf790688f51494
git rebase 590f4d3~ --onto d3bee05 --rebase-merges
- Push small size to origin
git push origin main --force-with-lease
- Clone fresh repo and add history repo to main as a branch
git remote add project-history C:\repos\git-replace\history
git fetch project-history
git branch history project-history/main
- Replace a commit from main to history for connection
git replace 92305a9 590f4d3
- Delete replacement
git replace -d 92305a9
Source: andrewlock.net
Articles
Tools
- git-spice - stack branches, keep update
Git bisect
Find a bad commit with git bisect
just run this command on a commit and mark them as git bisect good/bad
checkout another and run again git bisect good/bad
.
git bisect
is able to find your first bad
commit with i.e. git bisect run bin/rails rspec <FILE>
and mark commit good/bad
with the exitcode of your command.
Commit to an older hash
Run: git-amend.sh <older-hash>
hash=$1
git add .
git commit --fixup $hash
# 'GIT_EDITOR=true' makes the rebase non-interactive
GIT_EDITOR=true git rebase -i --autosquash $hash^
Ignoring bulk change commits with git blame (>git 2.23)
Ignore revs after bulk changes (ie style, format) in git blame:
touch .git-blame-ignore-revs # put commit ids here
git config --global blame.ignoreRevsFile .git-blame-ignore-revs # set file as default to ignore
Source: moxio
Highly recommended
The usage of aliases from git plugin/oh-my-zsh: git-plugin zsh-load: zinit
Here are some git commands, that I NOT used daily. Mainly i use the zsh git plugin with all the useful short commands
(alias) like gs # git status
and gcd # git checkout develop
. It is really handy and i love it.
Checkout a subdir of a git repository
$ mkdir pcl-examples
$ cd pcl-examples #make a directory we want to copy folders to
$ git init #initialize the empty local repo
$ git remote add origin -f https://github.com/PointCloudLibrary/pcl.git #add the remote origin
$ git config core.sparsecheckout true #very crucial. this is where we tell git we are checking out specifics
$ echo "examples/*" >> .git/info/sparse-checkout #recursively checkout examples folder
$ git pull --depth=2 origin master #go only 2 depths down the examples directory
Switch to previous branch
git checkout -
-
is an alias for the previous branch
Open all files with conflicts at once
git diff --name-only --diff-filter=U | uniq | xargs $EDITOR
What changed?
git whatchanged —-since=‘2 weeks ago’
Open a branch as new directory
git worktree add ../worktree2 master
git worktree remove ../f_branch_worktree
Search in git history
git rev-list —all | xargs git grep '<YOUR REGEX>' # regex
git rev-list —all | xargs git grep -F '<YOUR STRING>' # non-regex
Learn
JavaScript
NextJS Error
If this error occures:
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed
You just have to drop your .next
dir for fix that.
Use console print
Different type to print to console:
console.log() – For general output of logging information.
console.info() – Informative logging of information.
console.debug() – Outputs a message to the console with the log level debug.
console.warn() – Outputs a warning message.
console.error() – Outputs an error message.
console.assert()
console.count() - count line execution
console.dir() - print object
console.group() - start group
console.groupEnd() - end group
console.memory() - check heap size
console.table() - print tabular data
console.time() - track time
console.timeEnd()
console.trace() - output stack trace
Source: markodenic
React location listener
To trigger events on location change in React, i.e. for integrate tracking code:
import { useEffect } from 'react';
import { useHistory } from 'react-router-dom';
type EtrackWrapperProps = {
et_et: string;
et_pagename: string;
};
declare global {
interface Window {
gtag?: (key: string, trackingId: string, config: { page_path: string }) => void;
et_eC_Wrapper?: (props: EtrackWrapperProps) => void;
}
}
export type PushType = (id: string, pathname: string) => void;
interface TrackingProps {
trackerId: string;
update: PushType;
}
export const useTracking = ({ trackerId, update }: TrackingProps) => {
const { listen } = useHistory();
useEffect(() => {
const unlisten = listen((location) => {
update(trackerId, location.pathname);
});
return unlisten;
}, [trackerId, update, listen]);
};
Kotlin
Optional API
Source: https://4comprehension.com/kotlins-java-util-optional-equivalents/
val x: Int? = 7 // ofNullable()
val result = x
?.let { ... } // map()
?.takeIf { ... } // filter()
?: 42 // orElseGet()
Make
CFLAGS += -Wall -Wextra LDLIBS = -lcurses OBJS = foo.o bar.o baz.o
foo: $(OBJS) $(CC) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@
foo.o bar.o: foo.h
clean: rm -f $(OBJS) foo
Maven
Build subproject with dependencies include
mvn clean install -pl [project name] -amd
Change project version
mvn versions:set -DnewVersion=1.1.0 && mvn versions:commit
Postgres
Connect to db via docker
docker run --rm -it --name pgclient jbergknoff/postgresql-client postgresql://<USERNAME>@<HOST-IP>:<PORT>/<DATABASE_NAME>
Speedup queries
- with
Index Cond
instead ofFilter
withCreateAt > ?1 OR (CreateAt = ?1 AND Id > ?2)
, we can do(CreateAt, Id) > (?1, ?2)
- Always use BUFFERS when running an EXPLAIN. It gives some data that may be crucial for the investigation.
- Always, always try to get an Index Cond (called Index range scan in MySQL) instead of a Filter.
- Always, always, always assume PostgreSQL and MySQL will behave differently. Because they do.
Source: mattermost
Coding projects
In general there are some basic topics, you have to check before start a bigger project/application. These decisions are fundamental for the smooth development of a application.
Timestamp/Date persistance
How to deal with timestamps i.e. getting from user inputs? Do we wanna be timezone compatible with clients/users in different timezones? How to get timezone from user in my backend requests?
- persist timestamp and dates always in UTC in your database
- use of ISO8601 date/timestamp formats, but have to keep in mind on calculations
- most important; keep it consistant in your database
Logging/logfile analytics
What and when you should log something to your logfiles. Make a strategy about logging in general, to get information if you need some in your debugging session for a complex problem. Another great idea is, to have an external service to aggregate your logs for each project ie. rollbar. I would prefer to have for each project a aggregation of project wide logs of your application, hosts and client errors.
Internalisation i18n
Its always a good idea to start with an international translation files on your project. Its easy to looking for a phrase in your application and on the other hand its easy to add another language to your application, in case someone join your project with a different language. A great feature I saw on an project, to have a backend portal you get a possibility to edit you translations life for your keys.
Licenses
If you are planning to create a business, you must verify your licenses and dependencies to ensure they comply.
Wording
Create a list of terms that defines a particular aspect of a use-case to ensure all participants are referring to it in the same manner during conversations.
…
[…]
Python
Articles
Rails
Rails is a very cool framework for web-applications and IMO the best for mvp-prototyping and beyond.
Curriculum
Learning from some youtube guys:
- Video Source: Projekt
- Video Source: simple-pm
- Best practises Semicolon&Sons - Best practises I Passing ruby data to javaScript
Articles
- Great note collection from corsego
- devise, hotwire, turbo, darkmode, basics, views
- Some great articles about coding johnnunemaker
- rails, ruby, …
- Great summary about encryption in rails7 corsego
- ActiveRecord Mistakes that slow down your app
- Modularisation (Monolith):
Pattern matching
def extract(**data)
case data
in name: {first:}
puts first
in tags: [first_tag, *_]
puts first_tag
end
end
> extract(name: { first: "Brad", last: "Gessler" })
"Brad"
> extract(tags: ["person", "earthling"] })
"person"
def matcher(**data)
if first = data.fetch(:first)
puts first
elsif data.key?(:tags)
tags = data.fetch(:tags)
if tags.is_a? Array
puts tags.first
end
end
end
Source: fly.io
Colorize logger
module ColorizedLogger
COLOR_CODES = {
debug: "\e[36m", # Cyan
info: "\e[32m", # Green
warn: "\e[33m", # Yellow
error: "\e[31m", # Red
fatal: "\e[35m", # Magenta
unknown: "\e[37m" # White (or terminal default)
}.freeze
RESET = "\e[0m"
def debug(progname = nil, &block)
super(colorize(:debug, progname, &block))
end
def info(progname = nil, &block)
super(colorize(:info, progname, &block))
end
def warn(progname = nil, &block)
super(colorize(:warn, progname, &block))
end
def error(progname = nil, &block)
super(colorize(:error, progname, &block))
end
def fatal(progname = nil, &block)
super(colorize(:fatal, progname, &block))
end
def unknown(progname = nil, &block)
super(colorize(:unknown, progname, &block))
end
private
def colorize(level, message, &block)
"#{COLOR_CODES[level]}#{message || (block && block.call)}#{RESET}"
end
end
Rails.logger.extend(ColorizedLogger)
Test coverage pre-commit hook
To get an positive exit code for pre-commit hook integration you have to add this to your spec config:
# spec/spec_helper.rb
RSpec.configure do |config|
if ENV["TEST_COVERAGE"]
SimpleCov.start "rails" do
spec_paths = ARGV.grep %r{(spec)/\w+}
if spec_paths.any?
file_paths = spec_paths.map { |spec_path| spec_path.gsub(%r{spec/|_spec}, "") }
add_filter do |file|
file_paths.none? do |file_path|
if file.filename.include? "/app/"
file.filename.match?(%r{/app/#{file_path}})
else
file.filename.include?(file_path)
end
end
end
end
minimum_coverage 98.9
minimum_coverage_by_file 81.4
end
else
SimpleCov.start "rails"
end
[...]
Pre-commit hook:
files=$(git --no-pager diff --name-only --cached --diff-filter=AM)
erbfiles=$(echo "$files" | grep -e '\.html.erb$')
[[ -n "$specfiles" ]] && (TEST_COVERAGE=true bundle exec rspec "$specfiles" || exit 1)
before_action wrapper
class User::LikesController < ApplicationController
abort_without_feature :like
must_have_feature :like
requires_feature :like
end
# app/controllers/concerns/requires_feature.rb
module RequiresFeature
def requires_feature(name, from: :user, **)
before_action(-> { head :bad_request unless Flipper.enabled?(name, Current.public_send(from)) }, **)
end
end
Source: buttondown
Rails ERD
For creating an erd diagram of your db schema, you could create a pdf with: rails-erd with this command:
bundle exec rails erd attributes=foreign_keys,primary_keys,timestamps,content notation=bachman
Race conditions
Avoid race conditions with ActiveRecord::Base.transaction do
and Model.lock.find(model_id)
or my_model_object.lock!
Source: fastruby.io
Migration from sidekiq to solid_queue
Step 1: Update Gemfile
# Remove Sidekiq
# gem 'sidekiq'
# Add Solid Queue
gem 'solid_ queue'
Step 2: Run bundle install
# $ bundle install
Step 3: Generate Solid Queue installation files
# $ rails generate solid_queue:install
Step 4: Run migrations
# $ rails db:migrate
Step 5: Update config/application.rb
# Rails.application.configure do
# config.active_job.queue_adapter = :solid_queue
# end
Step 6: Remove Sidekiq initializer
# Delete or comment out config/initializers/sidekiq.rb
Step 7: Update worker process command in Profile or deployment scripts
# Old: worker: bundle exec sidekiq
# New: worker: bundle exec rails solid_queue: start
Step 8: Remove Redis configuration related to Sidekiq
# Check config/redis.yml or any Redis initializers
Step 9: Update any Sidekiq-specific code in your jobs
Before:
# class MyJob
# include Sidekiq: :Worker
# def perform(args)
# job logic
# end
# end
After:
# class MyJob < ApplicationJob
# queue_as: default def perform(args)
# job logic
# end
Step 10: Update any Sidekiq-specific API calls
# Before: Sidekiq:: Client.push( 'class' => MyJob,
# After: MyJob. perform_later (1, 2, 3)
Step 11: Set up Mission Control (optional)
# In Gemfile:
gem 'mission_control-jobs'
# In config/routes.rb:
Rails.application.routes.draw do
mount MissionControl::Jobs::Engine, at: "/jobs"
end
Step 12: Remove any Sidekiq web UI routes
# Delete or comment out in config/routes.rb:
# require 'sidekiq/web'
# mount Sidekiq:: Web => '/sidekiq'
Responsible monkeypatch
Here’s the list of rules I try to follow:
- Wrap the patch in a module with an obvious name and use
Module#prepend
to apply it - Make sure you’re patching the right thing
- Limit the patch’s surface area
- Give yourself escape hatches
- Over-communicate
# ActionView's date_select helper provides the option to "discard" certain
# fields. Discarded fields are (confusingly) still rendered to the page
# using hidden inputs, i.e. <input type="hidden" />. This patch adds an
# additional option to the date_select helper that allows the caller to
# skip rendering the chosen fields altogether. For example, to render all
# but the year field, you might have this in one of your views:
#
# date_select(:date_of_birth, order: [:month, :day])
#
# or, equivalently:
#
# date_select(:date_of_birth, discard_year: true)
#
# To avoid rendering the year field altogether, set :render_discarded to
# false:
#
# date_select(:date_of_birth, discard_year: true, render_discarded: false)
#
# This patch assumes the #build_hidden method exists on
# ActionView::Helpers::DateTimeSelector and accepts two arguments.
#
module RenderDiscardedMonkeypatch
class << self
EXPIRATION_DATE = Date.new(2021, 8, 15)
def apply_patch
if Date.today > EXPIRATION_DATE
puts "WARNING: Please re-evaluate whether or not the ActionView "\
"date_select patch present in #{__FILE__} is still necessary."
end
const = find_const
mtd = find_method(const)
# make sure the class we want to patch exists;
# make sure the #build_hidden method exists and accepts exactly
# two arguments
unless const && mtd && mtd.arity == 2
raise "Could not find class or method when patching "\
"ActionView's date_select helper. Please investigate."
end
# if rails has been upgraded, make sure this patch is still
# necessary
unless rails_version_ok?
puts "WARNING: It looks like Rails has been upgraded since "\
"ActionView's date_select helper was monkeypatched in "\
"#{__FILE__}. Please re-evaluate the patch."
end
# actually apply the patch
const.prepend(InstanceMethods)
end
private
def find_const
Kernel.const_get('ActionView::Helpers::DateTimeSelector')
rescue NameError
# return nil if the constant doesn't exist
end
def find_method(const)
return unless const
const.instance_method(:build_hidden)
rescue NameError
# return nil if the method doesn't exist
end
def rails_version_ok?
Rails::VERSION::MAJOR == 6 && Rails::VERSION::MINOR == 1
end
end
module InstanceMethods
# :render_discarded is an additional option you can pass to the
# date_select helper in your views. Use it to avoid rendering
# "discarded" fields, i.e. fields marked as discarded or simply
# not included in date_select's :order array. For example,
# specifying order: [:day, :month] will cause the helper to
# "discard" the :year field. Discarding a field renders it as a
# hidden input. Set :render_discarded to false to avoid rendering
# it altogether.
def build_hidden(type, value)
if @options.fetch(:render_discarded, true)
super
else
''
end
end
end
end
RenderDiscardedMonkeypatch.apply_patch
Source: appsignal/blog
RSpec
Bisect flaky tests
with rspec --bisect <file>
you could find flaky test setting to re-run it.
hint
If rspec
exits with 1
if suite passes, try untilpass() { until "$@"; do :; done }
and run it with untilpass rspec ...
Testing an array with attributes
expect(items[0].id).to eql(1)
expect(items[0].name).to eql('One')
expect(items[1].id).to eql(2)
expect(items[1].name).to eql('Two')
expect(items[0]).to have_attributes(id: 1, name: 'One')
expect(items[1]).to have_attributes(id: 2, name: 'Two')
expect(items).to match_array([
have_attributes(id: 1, name: 'One'),
have_attributes(id: 2, name: 'Two'),
])
Source: benpickles
Custom matcher
RSpec::Matchers.define :have_errors_on do |attribute|
chain :with_message do |message|
@message = message
end
match do |model|
model.valid?
@has_errors = model.errors.key?(attribute)
if @message
@has_errors && model.errors[attribute].include?(@message)
else
@has_errors
end
end
failure_message_for_should do |model|
if @message
"Validation errors #{model.errors[attribute].inspect} should include #{@message.inspect}"
else
"#{model.class} should have errors on attribute #{attribute.inspect}"
end
end
failure_message_for_should_not do |model|
"#{model.class} should not have an error on attribute #{attribute.inspect}"
end
end
# usage
describe User do
before { subject.email = "foobar" }
it { should have_errors_on(:email).with_message("Email has an invalid format") }
end
Data class
Similiar to the value-alike objects in ruby(3.2), here an example for rails:
class DataClass
ATTRIBUTES = %i[first_name last_name city zipcode phone_number].freeze
include ActiveModel::Model
attr_accessor *ATTRIBUTES
def ==(object)
ATTRIBUTES.all? { |attribute| public_send(attribute) == object.public_send(attribute) }
end
end
ConsumerClass.new(DataClass({first_name: "Bill", last_name: "...", ...}))
Links: Polyfill - Data gem
RSpec factory trait & transient
FactoryBot.define do
factory :user, class: User do
trait :with_book do
transient do
# 🦄1. default value when you use :with_book trait
# 🦄2. Dont't assign just 'Agile'. see also: https://thoughtbot.com/blog/deprecating-static-attributes-in-factory_bot-4-11
title { 'Agile' }
end
after(:build) do |user, evaluator|
user.book = FactoryBot.create(:book, title: evaluator.title)
end
end
end
factory :book, class Book do
sequence(:title) { |n| "book no.#{n}" } # 🦄 default value
end
end
# usage
let!(:user) { create(:user, :with_book, title: 'Ruby') }
Source: dev.to/n350071
RailsWorld2023
Some notes on talks:
- Turbo morphing
- new feature for keep scrolling position on whole dom body change
- no-build / bun
- key goal to eliminate build time for frontend stuff, ship as code
- if assignment block
def test 42 end if a = test puts "Assign #{a}" else puts "Nil is return" end
- Class.method(:name).source_location
- get code location of a method
- Model attribute strict_loading prohibit loading relations
- Migration add_column :virtual
create_table :users do |t|
t.numeric :height_cm
t.virtual :height_in, type: :numeric, as: 'height_cm / 2.54', stored: true
end
- Model with_options relations
class User
with_options dependent: :destroy do |options|
options.has_many :tasks, class_name: "UserTask"
options.has_many :addresses
end
end
- try(:method_name) || default_method
- Routing constraints
- subdomain
- authenticated
- Routes draw split into files
- rails generate generator ApiClient
- String truncate_words with omission
- DateTime before? past? future?
- Time.current.all_day .all_week …
- Abbreviation number_to_human() round_mode significant format units
Professional Ruby on Rails Developer with Rails 5
Some notes while doing the udamy course and some ruby notes:
Basics
Render plain text:
def hello
render plain: "hello world!"
end
Create a controller with a method and use a object in view:
# controller
class TodosController < ApplicationController
def new
@todo = Todo.new
end
end
# view
<%= form_for @todo do |f| %>
<% end %>
Use flash
for notifications:
#controller
@todo.save
flash[:notice] = "Todo was created successfully"
# view
<% flash.each do |name, msg| %>
<ul>
<li><%= msg %></li>
</ul>
<% end %>
A bootstrap styled flash messages:
<div class="row">
<div class="col-md-10 col-md-offset-1">
<% flash.each do |name, msg| %>
<div class="alert alert-<%= name %>">
<a href="#" class="close" data-dismiss="alert">×</a>
<%= msg %>
</div>
<% end %>
</div>
</div>
Render partials in view ie a file views/layouts/_messages.html.erb
:
<%= render 'layouts/messages' %>
Before run a method do action:
# controller
before_action :set_todo, only: [:edit, :update, :show, :destroy]
private
def set_todo
@todo = Todo.find(params[:id])
end
def todo_params
params.require(:todo).permit(:name, :description)
end
# permit has_many list
def recipe_params
params.require(:recipe).permit(:name, :description, ingredient_ids: [])
end
end
Add pg to production for ie. heroku deployment:
group :production do
gem 'pg'
end
bundle install --without production
Some simple validations:
validates :name, presence: true
validates :description, presence: true, length: { minimum: 5, maximum: 500 }
Application helpers:
helper_method :current_chef, :logged_in?
def current_chef
@current_chef ||= Chef.find(session[:chef_id]) if session[:chef_id]
end
def logged_in?
!!current_chef
end
def require_user
if !logged_in?
flash[:danger] = "You must be logged in to perform that action"
redirect_to root_path
# also possible
redirect_to :back
end
end
Render partial for model:
# View
<% if recipe.ingredients.any? %>
<p>Ingredients: <%= render recipe.ingredients %></p>
<% end %>
# Now create a new partial _ingredient.html.erb under the app/views/ingredients folder for this to work
<span class="badge"><%= link_to ingredient.name,
ingredient_path(ingredient) %> </span>
Model
Order models by column:
# order by updated_at -> top of model
default_scope -> { order(updated_at: :desc) }
Get just the last 20 entries of a model
def self.most_recent
order(:created_at).last(20)
end
Routes
Set root route:
# router.rb
root "pages#home"
Specific route to controller#method:
get '/about', to: 'pages#about'
Nested routes:
resources :recipes do
resources :comments, only: [:create]
end
# Form in view
<%= form\_for(\[@recipe, @comment\], :html => {class: "form-horizontal",
role: "form"}) do |f| %>
Links
Create links in views:
<%= link_to "Edit this todo", edit_todo_path(@todo) %>
<%= link_to "Back to todos listing", todos_path %>
<td><%= link_to 'delete', todo_path(todo), method: :delete, data: { confirm: "Are you sure?"} %></td>
<%= link_to "MyRecipes", root_path, class: "navbar-brand", id: "logo" %>
<%= link_to "Sign up or log in", "#" class: "btn btn-danger btn-lg" %>
Tests
Create integration test for model:
rails generate integration_test recipes
Simple test root path:
test "should get home" do
get pages_home_url
assert_response :success
end
test "should get root" do
get root_url
assert_response :success
end
to fix this tests, do:
root "pages#home"
get 'pages/home', to: 'pages#home'
# controller
class PagesController < ApplicationController
def home
end
end
Test a simple validation:
require 'test_helper'
class RecipeTest < ActiveSupport::TestCase
def setup
@recipe = Recipe.new(name: "vegetable", description: "great vegetable recipe")
end
test "recipe should be valid" do
assert @recipe.valid?
end
test "name should be present" do
@recipe.name = " "
assert_not @recipe.valid?
end
test "description should be present" do
@recipe.description = " "
assert_not @recipe.valid?
end
test "description shouldn't be less than 5 characters" do
@recipe.description = "a" * 3
assert_not @recipe.valid?
end
test "description shouldn't be more than 500 characters" do
@recipe.description = "a" * 501
assert_not @recipe.valid?
end
test "should get recipes show" do
get recipe_path(@recipe)
assert_template 'recipes/show'
assert_match @recipe.name, response.body
assert_match @recipe.description, response.body
assert_match @chef.chefname, response.body
end
test "should get recipes listing" do
get recipes_path
assert_template 'recipes/index'
assert_select "a[href=?]", recipe_path(@recipe), text: @recipe.name
assert_select "a[href=?]", recipe_path(@recipe2), text: @recipe2.name
end
end
Test a email validation:
require 'test_helper'
class ChefTest < ActiveSupport::TestCase
def setup
@chef = Chef.new(chefname: "mashrur", email: "mashrur@example.com")
end
test "should be valid" do
assert @chef.valid?
end
test "name should be present" do
@chef.chefname = " "
assert_not @chef.valid?
end
test "name should be less than 30 characters" do
@chef.chefname = "a" * 31
assert_not @chef.valid?
end
test "email should be present" do
@chef.email = " "
assert_not @chef.valid?
end
test "email should not be too long" do
@chef.email = "a" * 245 + "@example.com"
assert_not @chef.valid?
end
test "email should accept correct format" do
valid_emails = %w[user@example.com MASHRUR@gmail.com M.first@yahoo.ca john+smith@co.uk.org]
valid_emails.each do |valids|
@chef.email = valids
assert @chef.valid?, "#{valids.inspect} should be valid"
end
end
test "should reject invalid addresses" do
invalid_emails = %w[mashrur@example mashrur@example,com mashrur.name@gmail. joe@bar+foo.com]
invalid_emails.each do |invalids|
@chef.email = invalids
assert_not @chef.valid?, "#{invalids.inspect} should be invalid"
end
end
test "email should be unique and case insensitive" do
duplicate_chef = @chef.dup
duplicate_chef.email = @chef.email.upcase
@chef.save
assert_not duplicate_chef.valid?
end
test "reject an invalid signup" do
get signup_path
assert_no_difference "Chef.count" do
post chefs_path, params: { chef: { chefname: " ",
email: " ", password: "password",
password_confirmation: " " } }
end
assert_template 'chefs/new'
assert_select 'h2.panel-title'
assert_select 'div.panel-body'
end
test "accept valid signup" do
get signup_path
assert_difference "Chef.count", 1 do
post chefs_path, params: { chef: { chefname: "mashrur",
email: "mashrur@example.com", password: "password",
password_confirmation: "password" } }
end
follow_redirect!
assert_template 'chefs/show'
assert_not flash.empty?
end
end
# controller
class Chef < ApplicationRecord
validates :chefname, presence: true, length: { maximum: 30 }
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
validates :email, presence: true, length: { maximum: 255 },
format: { with: VALID_EMAIL_REGEX },
uniqueness: { case_sensitive: false }
end
Downcase before save with test:
before_save { self.email = email.downcase }
# And then test it with:
test "email should be lower case before hitting db" do
mixed_email = "JohN@ExampLe.com"
@chef.email = mixed_email
@chef.save
assert_equal mixed_email.downcase, @chef.reload.email
end
Create a association and test it:
Association
# chef model
validates :chef_id, presence: true
has_many :recipes
# recipe model
belongs_to :chef
# destroy with dependent
has_many :recipes, dependent: :destroy
Test
def setup
@chef = Chef.create!(chefname: "mashrur", email: "mashrur@example.com")
@recipe = @chef.recipes.build(name: "vegetable", description: "great vegetable recipe")
end
test "recipe without chef should be invalid" do
@recipe.chef_id = nil
assert_not @recipe.valid?
end
Styling
Add bootstrap
to project (good html/css tutorial link):
gem 'bootstrap-sass', '~> 3.3.7'
gem 'jquery-rails'
# app/assets/javascripts/application.js
//= require bootstrap-sprockets
# app/assets/stylesheets/custom.css.scss
@import "bootstrap-sprockets";
@import "bootstrap";
Views
Render html for each data:
<%= f.collection_check_boxes :ingredient_ids,
Ingredient.all, :id, :name do |cb| %>
<% cb.label(class: "checkbox-inline input_checkbox") {cb.check_box(class: "checkbox") + cb.text} %>
<% end %>
Database
Create migration:
rails generate migration create_recipes
# modify the migration file
rails db:migrate
Rename column:
rename_column :recipes, :email, :description
rails db:migrate
Many to many association:
# Model
has_many :recipe_ingredients
has_many :recipes, through: :recipe_ingredients
Articles
- Using the url as a state management jacobparis
Prevent useEffect render on mount
Create a custom useEffect hook
import { DependencyList, EffectCallback, useEffect, useRef } from 'react';
export function useDidUpdateEffect(
effect: EffectCallback,
deps?: DependencyList
) {
// a flag to check if the component did mount (first render's passed)
// it's unrelated to the rendering process so we don't useState here
const didMountRef = useRef(false);
// effect callback runs when the dependency array changes, it also runs
// after the component mounted for the first time.
useEffect(() => {
// if so, mark the component as mounted and skip the first effect call
if (!didMountRef.current) {
didMountRef.current = true;
} else {
// subsequent useEffect callback invocations will execute the effect as normal
return effect();
}
}, deps);
}
Source: stackoverflow
Wrap component into custom one
A better way to customize third-party components, create a custom one with your customizations and use it, instead of copy-paste customizations everywhere.
import * as React from 'react';
import { ReactNode } from 'react';
import { Link, LinkProps } from '@chakra-ui/react';
type VariantType = 'primary' | 'secondary';
type Props = {
variant?: VariantType;
children: ReactNode;
} & Pick<LinkProps, 'href'>;
export const LinkComponent = ({ variant = 'primary', children, ...props }: Props) => {
return (
<Link variant={variant} {...props}>
{children}
</Link>
);
};
Ruby
Some interesting ressources for the programming language ruby.
Books
Interesting
RVM SSL errors
Install again with:
rvm install 3.0.2 --with-openssl-dir=`brew --prefix openssl`
If you got You must recompile Ruby with OpenSSL support
on Mac ARM (M1) you have to:
brew uninstall openssl@3
brew reinstall openssl@1.1
#open new shell
rvm reinstall "ruby-3.0.0" --with-openssl-dir=`brew --prefix openssl@1.1` --disable-binary
On arch you have to install openssl-1.0 and run:
PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig:/usr/lib/pkgconfig rvm install <ruby-version>
Merge hashes
# Turn a collection of hashes into a single one
{ "yellow" => "#FFBEOB" },
{ "orange" => "#FB5607" },
{ "pink" => "#FF006E" }
1. reduce ({},:merge)
#=>“"yellow"=>"#FFBEOB", "orange"=>"#FB5607", "pink"=>"#FF006E"}
{}.merge(hash1, hash2, hash3) # works as well
Useful functions
Some ruby
functions:
truncate(recipe.description, length: 150) # truncate
time_ago_in_words(recipe.created_at) # date
pluralize(count, "apple") # pluralize if count > 1 to apples
Scripting
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'sqlite3'
end
# write ruby code below
...
Lambda composition
Combine lambda blocks together with >>
i.e. to create a new one like TAX_FEE = TAX >> FEE
# List of our individual pricing rules
TAX = ->(val) { val + val*0.05 }
FEE = ->(val) { val + 1 }
PREMIUM = ->(val) { val + 10 }
DISCOUNT = ->(val) { val * 0.90 }
ROUND_TO_CENT = ->(val) { val.round(2) }
# One presenter
PRESENT = ->(val) { val.to_f }
# Pre-define some rule sets for some pricing scenarios
REGULAR_SET = [FEE, TAX, ROUND_TO_CENT, PRESENT]
PREMIUM_SET = [FEE, PREMIUM, TAX, ROUND_TO_CENT, PRESENT]
DISCOUNTED_SET = [FEE, DISCOUNT, TAX, ROUND_TO_CENT, PRESENT]
Now we can define a price calculator:
def apply_rules(rules:, base_price:)
rules.inject(:>>).call(base_price)
end
Source: get-around.tech
Object lookup
module GildedRose
DEFAULT_CLASS = Item
SPECIALIZED_CLASSES = {
'normal' => Normal,
'Aged Brie' => Brie,
'Backstage passes to a TAFKAL80ETC concert' => Backstage }
def self.for(name, quality, days_remaining)
(SPECIALIZED_CLASSES[name] || DEFAULT_CLASS)
.new(quality, days_remaining)
end
end
Match data
class MatchData
alias_method :deconstruct, :to_a
def deconstruct_keys(keys)
named_captures.transform_keys(&:to_sym).slice(*keys)
end
end
IP_REGEX = /
(?<first_octet>\d{1,3})\.
(?<second_octet>\d{1,3})\.
(?<third_octet>\d{1,3})\.
(?<fourth_octet>\d{1,3})
/x
'192.168.1.1'.match(IP_REGEX) in {
first_octet: '198',
fourth_octet: '1'
}
# => true
Source: dev.to/baweaver
Case for array items:
def process (input)
case input
in []
:empty
in [*] if input.all?(Order)
:has_only_orders
in [*] if input.all? (Payment)
:has_only_payments
else
end
Refinement
Extend/overwrite string behavior in module (specific scope)
module PatchedString
refine String do
def +(value)
self << ", #{value}"
end
end
end
module RegularNamespace
def self.append_strings(a, b)
a + b
end
end
module PatchedNamespace
using PatchedString
def self.append_strings(a, b)
a + b
end
end
RegularNamespace.append_strings("1", "2") # => "12"
PatchedNamespace.append_strings("1", "2") # => "1, 2"
Rust notes
Learning
TODO:
- wasm tutorial -> linuxfoundation
- Crossplatform desktop app -> css-tricks
Wrapper types
Box This abstraction is a low cost abstraction for dynamic allocation. If you want to allocate some memory on the heap and safely pass a pointer to that memory around, this is ideal.
Rc is a reference counted pointer for multiple owning.
Source: Wrapper types
Articles
- Some nice tipps & tricks from federicoterzi
- Great google book for learning rust in 3 days (android) google
Error handling
Rusts result type is a great construct for creating error chains, something like:
#![allow(unused)] fn main() { fn read_config_file(path: &str) -> Result<String, ConfigFileError> { std::fs::read_to_string(path) .map_err(ConfigFileError::ReadError) } fn parse_config_file(file: String) -> Result<i32, ConfigFileError> { file.parse() .map_err(ConfigFileError::ParseError) } fn work_with_config_file(path: &str) -> Result<i32, ConfigFileError> { // No ? required at all - just directly return // the Result, since the types match! read_config_file(path).and_then(parse_config_file) // .and_then(something_else).and_then(even_more_things) .... } }
Source: naiveai, bruntsushi
TypeScript
Enum map specific values
enum Size {
small = 'small',
middle = 'middle',
large = 'large',
}
type SizeMapType<T> = { [key in Size]?: T } & { default: T };
// alternativly something like
// type SizeMapType<T> = Partial<Record<Size, T>>;
const SizeSpecificValue: SizeMapType<Number> = {
[Size.small]: 12,
[Size.middle]: 22,
[Size.large]: 32,
default: 0
}
// fetch data from api and map to enum
const sizeFromApi = Size.middle
const value = SizeSpecificValue[sizeFromApi] || SizeSpecificValue.default
Equipment
Here are a collection of my most favorite technical apps/devices/configuartions.
Equipment
Hardware - Dell XPS 13 9370 (Arch Linux) - iPhone 7 (MN922ZD/A) - iPad mini
Mechanical keyboard
Actualy using my keychron k2, but sneaking infos about some [[tech/splitkb|splitted one]], i.e. Ferris sweep or some better one from mb for DIY.
Operating system (💙)
Arch Linux: - Alacritty (terminal emulator) - Btrfs (filesystem) - Dmenu (launcher) - Firefox (browser) - NeoVim (texteditor) - Neomutt (email client) - Nextcloud (cloud) - Pass (password-manager) - Polybar (statusbar) - Ranger (file manager) - Spotify (music) - Telegram (messeging) - Visual Studio code (editor) - i3 (tiling window manager)
iPhone
Favorite apps: - Youtube (media) - Duolingo (language learning) - Feedly (RSS-reader) - Firefox (browser) - Google News (news) - Instagram (social) - Nextcloud (cloud) - Pass (password-manager) - Reddit (social) - Spotify (music/podcast) - Strava (sport tracking) - TV Time (series tracking) - Telegram/WhatsApp (messenger) - Tomorrow (banking) - Twitter (social) - Wireguard (vpn) - Wunderlist (todo list) - Pocket (readinglist)
What Filesystem Should I Use Today?
Do you want to guarantee your data is free of corruption?
ZFS for your data you care about (/home
) and XFS on LVM for anything else.
Do you want to avoid mucking about with kernel modules?
XFS on LVM
Use btrfs on your root (/
) volume. But at least make /home xfs.
And have backups. borg backup is good.
Source: blackhats.net.au
Secure your VPS
- Updated your server’s software to the latest version
$ sudo apt update
$ sudo apt upgrade
$ sudo adduser username
$ sudo usermod -aG sudo username
$ su - username
$ sudo whoami
- Disabled password authentication and set up a more secure key-based authentication mechanism
$ ssh-keygen -t ed25519 -C "email@example.com"
$ ssh-copy-id -i ~/.ssh/ed25519.pub username@12.34.56.78
$ ssh -i ~/.ssh/ed25519 -o PasswordAuthentication=no username@12.34.56.78
$ eval "$(ssh-agent -s)"
$ ssh-add ~/.ssh/ed25519
$ ssh username@12.34.56.78
alias ssh-vps='ssh username@12.34.56.78'
$ source ~/.zhsrc
- Added a firewall to control access to your server’s ports
$ ssh username@12.34.56.78
$ sudo vim /etc/ssh/sshd_config
PermitRootLogin no
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
$ sudo service sshd reload
$ ssh root@12.34.56.78
- Installed Fail2Ban to automatically block IP addresses making unauthorised connection attempts
$ sudo apt install ufw
$ sudo ufw status verbose
$ sudo ufw disable
$ sudo ufw app list
$ sudo ufw allow 'OpenSSH'
$ sudo ufw show added
ufw allow OpenSSH
$ sudo ufw default deny incoming
$ sudo ufw default allow outgoing
$ sudo ufw allow 'Nginx Full'
$ sudo ufw enable
$ sudo ufw status verbose
- Configured automatic security upgrades and patches
$ sudo apt install fail2ban
$ sudo systemctl status fail2ban.service
○ fail2ban.service - Fail2Ban Service
Loaded: loaded (/lib/systemd/system/fail2ban.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:fail2ban(1)
$ cd /etc/fail2ban
$ sudo cp jail.conf jail.local
$ sudo vim jail.local
[sshd]
enabled = true
mode = aggressive
...
$ sudo systemctl enable fail2ban
$ sudo systemctl start fail2ban
$ sudo systemctl status fail2ban
Source: kkyrie
Apps
https://getkap.co/ - screen recording
https://contao.org/de/
http://www.zentyal.org/
Ninite - Software Installation
Zoneminder - Video Betriebssystem
Froxlor - alt. SysCP
MarkdownPad2
Nfon
Prezi.com
J Language
MS Mathematics
PapDesigner
SOGo/ZAG
Glympse - live Standort mitteilen
speedof.me - html5 speedtest
Bodhi
Hiren's BootCD From USB
ceph
Mirantis
Xming - XServer für putty
skjlls.com - eigene Kompetenz in Euro messen
reveal.js - HTML Presentation
Dynv6 - dyndns
Skuawk.com - bildportal
Wallpaper pattern http://subtlepatterns.com/
Audials - rip spotify
ApricityOS
Mattermost - Slack OS alternative
Phacility/Phanricator - PM Tool
HackerOne/BugCrowd/Mutilledae -Security Spiel
scoop - windows shell
tls.imirhil.fr - Cryptocheck
bulma.io - css framework
Zazu - launcher
curl -Ss icanhazip.com - IP Adresse
Mango - markdown editor
Desmos/calculator - graphen
Etcher.io - Bootable Usb
tyyd - share terminal via http
reptyr - transfer process to tmux
wtfutil - personal site in terminal
ulauncher - app launcher
Arch linux
Sway
Full wayland config: fosskers.ca
Packages
Nemo - File Explorer
Seahorse - GUI für keyring
alacritty-git # rust terminal emulator
alsa-utils
apvlv
arandr
arc-gtk-theme
archfetch
at
autoconf
autojump
autojump - Terminal directory switch
automake
base-devel - Maketools
bat
bat - cat alternative
bc
bc - bash calculator
bleachbit
calcurse
calcurse - Kalender
compton
cower
dbeaver
diff-so-fancy
dmenu
docker
dunst
exa
exa - ls Ersatz
fd
feh
feh - Bildbeteachtung Bash
file-roller p7zip zip unzip unrar
firefox
fish
font-manager
fzf
fzf - fuzzy finder
gcc
gcc-libs
git
git-flow-completion-git
gitg
gnome-font-viewer
gnome-keyring
gnome-keyring - Passwort Verwaltung
go
gparted
gq
grep
gsimplecal
gucharmap - Font Manager
htop - Prozessexplorer
hugo
i3blocks
i3gaps # window manager
i3status
icdiff
iftop
imagemagick
inetutils
intellij-idea-community-edition
inxi
iputils
make
maven
mc
minitube
ncdu
ncdu - Tree Size
neofetch
neofetch - Bash
neomutt
neovim
neovim - Editor
network-manager-applet
networkmanager
newsboat
nmap
notification-daemon
npm
numlockx
numlockx - Numpad
offlineimap
oh-my-zsh-git
p7zip
pass
pass - Passwortmanager
pass-otp
pass-update
peco
peco - Filertool
polybar-git
prezto-git
pulseaudio
pulseaudio-alsa
pv
pymodoro-git
python-neovim
python-pip
python2-neovim
python2-pip
qtpass
qutebrowser
ranger
ranger - File Explorer
rdesktop
reflector
reflex - run cmd after file change
resty-git
ripgrep
ripgrep - searcher
rofi
rofi-greenclip
rofi-pass-git
rsync
rustup
rxvt-unicode
screenfetch
scrot
shellcheck
simplescreenrecorder
slack-desktop
stow
strace
sublime-text-dev
terminator
terminator - Terminal
termite
thefuck - command correcter
tldr
tldr - short man page
tmux
ttf-iosevka
ttf-iosevka-term
turtl - Notes
ufw
ufw - Firewall
unzip
vim
vimpager
visual-studio-code
wal-git
weechat
wget
wunderline
xarchiver
xclip
xdg-user-dirs
xdg-user-dirs - User folders
xdotool
xss-lock
yay
zathura
zathura-pdf-mupdf
zsh
zsh-syntax-highlighting
10 Things after installation
Source: Average Linux User
Check your current kernel: uname -r
1. Install an LTS kernel and reconfigure grub:
sudo pacman -S linux-lts
sudo grub-mkconfig -o /boot/grub/grub.cfg
You may also install linux-lts-headers. Reboot and check which kernel is in use with uname -r.
Remove non-lts kernel sudo pacman -Rs linux
2. Install Microcode
For intel processors with grub boot loader:
sudo pacman -S intel-ucode
sudo grub-mkconfig -o /boot/grub/grub.cfg
For AMD processors install linux-firmware package.
3. Disable GRUB delay
Add the following to /etc/default/grub: achieve the fastest possible boot:
GRUB_FORCE_HIDDEN_MENU="true"
Then put file 31_hold_shift to /etc/grub.d/. Download 31_hold_shift https://goo.gl/nac6Kp
Make it executable, and regenerate the grub configuration:
sudo chmod a+x /etc/grub.d/31_hold_shift
sudo grub-mkconfig -o /boot/grub/grub.cfg
4. Install some key packages
sudo pacman -S adobe-source-sans-pro-fonts aspell-en enchant gst-libav gst-plugins-good hunspell-en icedtea-web jre8-openjdk languagetool libmythes mythes-en pkgstats ttf-anonymous-pro ttf-bitstream-vera ttf-dejavu ttf-droid ttf-gentium ttf-liberation ttf-ubuntu-font-family
5. Set up firewall
Install ufw:
sudo pacman -S ufw
Enable it.
sudo ufw enable
Check its status:
sudo ufw status verbose
Enable the start-up with the system:
sudo systemctl enable ufw.service
Reboot and check the status again. It should be active.
6. Encrypt your home directory
Logged out. Switch to a console with Ctrl+Alt+F2. Login as a root and check that your user own no processes:
ps -U username
Install the necessary applications:
sudo pacman -S rsync lsof ecryptfs-utils
Then encrypt your home directory:
modprobe ecryptfs
ecryptfs-migrate-home -u username
Mount your encrypted home.
ecryptfs-mount-private
Unwrap the passphrase and save it somewhere where only you can access it.
ecryptfs-unwrap-passphrase
Run
ls .ecryptfs
Edit /etc/pam.d/system-auth:
After the line “auth required pam_unix.so” add:
auth required pam_ecryptfs.so unwrap
Above the line “password required pam_unix.so” insert:
password optional pam_ecryptfs.so
After the line “session required pam_unix.so” add:
session optional pam_ecryptfs.so unwrap
Reboot and make sure that you can login to your desktop
7. Remove orphans
sudo pacman -Rns $(pacman -Qtdq)
8. Optimize pacman’s database access speeds
sudo pacman-optimize
9. Check for errors
sudo systemctl --failed
sudo journalctl -p 3 -xb
10. Backup the system
sudo rsync -aAXvP --delete --exclude=/dev/* --exclude=/proc/* --exclude=/sys/* --exclude=/tmp/* --exclude=/run/* --exclude=/mnt/* --exclude=/media/* --exclude=/lost+found --exclude=/home/.ecryptfs / /mnt/backupDestination/
@linux @bash
Useful oneliners
Show dir sizes: du -hs */ | sort -hr | head
Show ssh key ids
for file in $(fd -e pub); do ssh-keygen -lf $file && echo $file; done
for file in $(fd -e pub); do ssh-keygen -l -E md5 -f $file && echo $file; done
ENV via ssh forward
export MYVAR=test
ssh myhost "export MYVAR='$MYVAR' && echo $MYVAR"
# test
A one-liner version incrementer
inc_version() {
awk -F. -vOFS=. '{ $ver++; while(ver++<NF) $ver=0; print $0 }' ver=$1
}
Source: https://gir.st/blog/inc-version.htm
Reset efivars in bootmenu (bootctl)
To remove LoaderEntryDefault-[…] variable it was enough to press d key twice in the boot menu: to set and unset a new value. To remove LoaderConfigTimeout-[…] variable it turned out enough to press Shift+t enough times to set the timeout to 0, plus one more time. Link
Check dns server for dnssec
With dig +dnssec kuketz-blog.de @116.203.32.217
check for flags, needs to have
the ad
included, for authenticated answer.
Search in .tar.gz files
rg -a -z 'regex'
List open ports
sudo ss -tulpn
sudo netstat -tulpn | grep LISTEN
sudo lsof -i -P -n | grep LISTEN # process list
sudo lsof -i -n -P | grep TCP # macOS
sudo nmap -sT -O localhost # scan localhost
Find file from iNode Number
find ~/ -inum 123456
Start GUI app in background from commandline
<guiapp> . &!
Run last command as root
sudo !!
Serve current dir tree at :8080
Only in python2
python -m SimpleHTTPServer
Python3:
python3 -m http.server
### Replacing in last command
^sub^to
### Supervise command (run every 2s)
watch “ls -larth”
### Kill program using one port
```bash
sudo fuser -k 8000/tcp
Limit memory usage for following commands
ulimit -Sv 1000 # 1000 KBs = 1 MB
ulimit -Sv unlimited # Remove limit
Rename selected files using a regular expression
rename 's/\.bak$/.txt/' *.bak
Get full path of file
readlink -f file.txt
List contents of tar.gz and extract only one file
tar tf file.tgz
tar xf file.tgz filename }}
List files by size
ls -lS
Nice trace route
mtr google.com
Find files tips
find . -size 20c # By file size (20 bytes)
find . -name "*.gz" -delete # Delete files
find . -exec echo {} \; # One file by line
./file1
./file2
./file3
find . -exec echo {} \+ # All in the same line
./file1 ./file2 ./file3
Print text ad infinitum
yes
yes hello
Who is logged in?
w
Prepend line number
ls | nl
Grep with Perl like syntax (allows chars like \t)
grep -P "\t"
Cat backwards (starting from the end)
tac file
Check permissions of each directory to a file
It is useful to detect permissions errors, for example when configuring a web server.
namei -l /path/to/file.txt
Run command every time a file is modified
while inotifywait -e close_write document.tex
do
make
done
Copy to clipboard
cat file.txt | xclip -selection clipboard
Spell and grammar check in Latex
detex file.tex | diction -bs
You may need to install the following sudo apt-get install diction texlive-extra-utils.
Check resources’ usage of command
/usr/bin/time -v ls
Randomize lines in file
cat file.txt | sort -R
cat file.txt | sort -R | head # Pick a random sambple
Even better (suggested by xearl in Hacker news):
shuf file.txt
Keep program running after leaving SSH session
If the program doesn't need any interaction
nohup ./script.sh &
If you need to enter some input manually and then want to leave
./script.sh
<Type any input you want>
<Ctrl-Z> # send process to sleep
jobs -l # find out the job id
disown -h jobid # disown job
bg # continue running in the background
Of course, you can also use screen or tmux for this purpose.
Run a command for a limited time
timeout 10s ./script.sh
Restart every 30 minutes
while true; do timeout 30m ./script.sh; done
Combine lines from two sorted files
comm file1 file2
Split long file in files with same number of lines
split -l LINES -d file.txt output_prefix
Flush swap partition
If a program eats too much memory, the swap can get filled with the rest of the memory and when you go back to normal, everything is slow. Just restart the swap partition to fix it:
sudo swapoff -a
sudo swapon -a
Fix ext4 file system with problems with its superblock
sudo fsck.ext4 -f -y /dev/sda1
sudo fsck.ext4 -v /dev/sda1
sudo mke2fs -n /dev/sda1
sudo e2fsck -n <first block number of previous list> /dev/sda1
Create empty file of given size
fallocate -l 1G test.img
Manipulate PDFs from the command line
To join, shuffle, select, etc. pdftk is a great tool
pdftk *.pdf cat output all.pdf # Join PDFs together
pdftk A=in.pdf cat A5 output out.pdf # Extract page from PDF
You can also manipulate the content with cpdf
cpdf -draft in.pdf -o out.pdf # Remove images
cpdf -blacktext in.pdf -o out.pdf # Convert all text to black color
Monitor the progress in terms of generated output
Write random data, encode it in base64 and monitor how fast it is being sent to /dev/null
cat /dev/urandom | base64 | pv -lbri2 > /dev/null
Scrum
Thats the most prefered agile software development method that I mostly worked with in DIFFERENT ways and most of the time, in a bad way (non-productive).
Daily
-
good way:
Everbody talk about their blockers or challenges for the task of that day. Pushes some urgent pull-requests for code-review or ask for clearafications from front-/back-end. Talk about upcoming releases and their open todos.
-
bad way:
Everyone just saying what they did yesterday and whats the plan for that day.
Review
-
good way:
Present something important things or howto for usage of a finished feature to the product owner.
-
bad way:
Everyone summarize the tasks of the finished sprint from own perspective.
Retrospective
-
good way:
Great tool for retrospectives is team-o-clock goretro
-
Step 1 (retro):
Everyone inputs some points into the i.e. following columns.
-
House of straw | House of sticks | House of bricks |
---|---|---|
… | … | … |
Start | Stop | Continue |
---|---|---|
… | … | … |
Liked | Learned | Lacked | Longed for |
---|---|---|---|
… | … | … | … |
-
-
Step 2 (grooming):
Everyone groom this points together (group them if same topic)
-
Step 3 (voting):
Everyone awards 3-5 points in total to their most important topics (points)
-
Step 4 (discussion):
In order to the most important points, everyone explain their point in more detail and discuss together what needs todo.
-
Step 5 (actions):
Collect some actions (todos) and plan them into the next sprint.
-
-
bad way:
Just ask for some complications, mostly without some feedback.
Planning
-
good way:
Create a good plan about the process of the next sprint with related tasks from frontend & backend.
-
bad way:
Just put some tasks into the next sprint and probably assign these to someone.
Refinement
-
good way:
Talk about tasks and pick someone from backend/frontend to make some technical assumptions about a possible approach.
-
bad way:
Just ask about question to some tasks and clearify these in a discussion.
Self-hosting
Im self-hosting some private services, like mailserver, cloud, rss aggregator etc.
Hoster
- contabo - have the smallest VPS for actually 4 Euro/mnth (unbeatable)
Device
If you want to self-host at home, you could get something like this:
Ideas
-
Great article about self-hosting architecture cprimozic
- modern nginx features with different modules
- phost for quick static site self-hosting
- sentry for logging
- httpbin for api testing
- send for private file sharing
- munin for monitoring
- google cloud archive coldline for backup
-
Note taking wiz.cn
-
todo management vikunja
-
host an own music streaming navidrome
-
Host my own signal proxy Help iran to connect signal
-
SMTP backup Mailcatcher Postfix relay config:
Edit the Postfix configuration to specify the desired relaying. Where example.com is your domain, in /etc/postfix/main.cf, set:
relay_domains = example.com relayhost = primary-mx.example.com inet_interfaces = all local_recipient_maps = mynetworks =
Launch Postfix. sudo /etc/init.d/postfix start
-
Web IRC Client the-lounge
-
IT Hardware Management Snap-IT
-
Media Server JellyFin
KNX
DIY
- Blog article for doing it yourself: Kosten senken durch Eigenleistung
- KNX DIY service: Main-Smarthome
# Home-Assistent
Cool stuff
Database correction
Sometimes getting wrong data from my smart meter, that one have to fix in database with the SQlite Web add-on on my home-assistant instance, with following commands:
SELECT *
FROM "statistics" WHERE CAST(mean AS DECIMAL(12,6)) LIKE '3976%'
UPDATE "statistics"
SET mean = OtherTable.Col1,
Col2 = OtherTable.Col2
FROM (
SELECT *
FROM "statistics" WHERE CAST(mean AS DECIMAL(12,6))
LIKE '3976%')
## Audio output on audio-jack
Install following plugin: [MPD](https://github.com/Poeschl/Hassio-Addons/tree/main/mpd)
## Pollenflug
Sensoren anlegen:
```yml
# Pollenflug Informationen
- platform: rest
scan_interval: 3600
name: "DWD Pollen"
resource: https://opendata.dwd.de/climate_environment/health/alerts/s31fg.json
json_attributes_path: "$..content[?(@.partregion_id==42)].Pollen"
json_attributes:
- Erle
- Beifuss
- Ambrosia
- Birke
- Esche
- Hasel
- Graeser
- Roggen
value_template: "{{ value_json.last_update }}"
- platform: template
sensors:
dwd_pollen_erle:
icon_template: "mdi:tree-outline"
friendly_name: "Erle"
value_template: >-
{% set dwd_state = state_attr('sensor.dwd_pollen', 'Erle')['today'] %}
{% if dwd_state == "3" %}6{% elif dwd_state == "2-3"%}5{% elif dwd_state == "2"%}4{% elif dwd_state == "1-2"%}3{% elif dwd_state == "1"%}2{% elif dwd_state == "0-1"%}1{% else %}0{% endif %}
attribute_templates:
today: >-
{% set dwd_state = state_attr('sensor.dwd_pollen', 'Erle')['today'] %}
{% if dwd_state == "3" %}6{% elif dwd_state == "2-3"%}5{% elif dwd_state == "2"%}4{% elif dwd_state == "1-2"%}3{% elif dwd_state == "1"%}2{% elif dwd_state == "0-1"%}1{% else %}0{% endif %}
tomorrow: >-
{% set dwd_state = state_attr('sensor.dwd_pollen', 'Erle')['tomorrow'] %}
{% if dwd_state == "3" %}6{% elif dwd_state == "2-3"%}5{% elif dwd_state == "2"%}4{% elif dwd_state == "1-2"%}3{% elif dwd_state == "1"%}2{% elif dwd_state == "0-1"%}1{% else %}0{% endif %}
Source: youtube/smarthomeyourself
Shutter control
MQTT Slider
Works! Tasmota wiki for covers:
cover:
- platform: mqtt
name: "Wohnzimmer Zentrale"
availability_topic: "Smarthome/jalosien/wohnzimmer/tele/LWT"
payload_available: "Online"
payload_not_available: "Offline"
position_topic: "Smarthome/jalosien/wohnzimmer/stat/SHUTTER1"
position_open: 100
position_closed: 0
set_position_topic: "Smarthome/jalosien/wohnzimmer/cmnd/ShutterPosition1"
command_topic: "Smarthome/jalosien/wohnzimmer/cmnd/BACKLOG"
payload_open: "ShutterOpen1"
payload_close: "ShutterClose1"
payload_stop: "ShutterStop1"
retain: false
optimistic: false
qos: 1
Definition from github snakuzzo:
- platform: mqtt
name: "Wohnzimmer Zentrale"
availability_topic: "Smarthome/jalosien/wohnzimmer/tele/LWT"
state_topic: "stat/sonoff-cletto/RESULT"
command_topic: "Smarthome/jalosien/wohnzimmer/cmnd"
value_template: '{{ value | int }}'
qos: 1
retain: false
payload_open: "ShutterOpen1"
payload_close: "ShutterClose1"
payload_stop: "ShutterStop1"
state_open: "ON"
state_closed: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
optimistic: true
set_position_topic: "Smarthome/jalosien/wohnzimmer/cmnd/shutterposition"
position_topic: "Smarthome/jalosien/wohnzimmer/stat/SHUTTER1"
A definition for slider from community/florian
- platform: mqtt
name: bedroom_cover
command_topic: "shellies/shellyswitch-xxxxxx/roller/0/command"
position_topic: "shellies/shellyswitch-xxxxxx/roller/0/pos"
set_position_topic: "shellies/shellyswitch-xxxxxx/roller/0/command/pos"
availability_topic: "shellies/shellyswitch-xxxxxx/online"
payload_available: "true"
payload_not_available: "false"
qos: 1
retain: false
payload_open: "open"
payload_close: "close"
payload_stop: "stop"
position_open: 100
position_closed: 0
optimistic: false
another one
- platform: mqtt
name: living_room_shutter
availability_topic: "Smarthome/jalosien/wohnzimmer/tele/LWT"
state_topic: "tele/persiana_dormitorio/RESULT"
command_topic: "Smarthome/jalosien/wohnzimmer/cmnd"
set_position_topic: "Smarthome/jalosien/wohnzimmer/cmnd/shutterposition"
value_template: "{{ value_json['SHUTTER-1'] }}"
qos: 1
retain: true
payload_open: "SHUTTEROPEN"
payload_close: "SHUTTERCLOSE"
payload_stop: "SHUTTERSTOP"
state_open: "ON"
state_closed: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
optimistic: true
Automation
- id: '1611493304194'
alias: Jalosien runter bei Sonnenuntergang
trigger:
- platform: sun
event: sunset
offset: +00:30:00
action:
- service: cover.set_cover_position
data:
position: 0
entity_id: cover.wohnzimmer_zentrale
mode: single
- id: '1611863540767'
alias: Jalosien hoch bei Sonnenaufgang
trigger:
- platform: sun
event: sunrise
offset: -00:30:00
action:
- service: cover.set_cover_position
data:
position: 100
entity_id: cover.wohnzimmer_zentrale
mode: single
Security
Interest things for security in general:
Articles:
- Minimum viable secure product mvsp
- Secure your VPS basic#Secure your VPS
Yubikey
Best practice guide: https://github.com/drduh/YubiKey-Guide Another great guide: https://yubikey.jms1.info
Secure password:
LC_ALL=C tr -dc 'A-Z1-9' < /dev/urandom | \
tr -d "1IOS5U" | fold -w 30 | sed "-es/./ /"{1..26..5} | \
cut -c2- | tr " " "-" | head -1
Configuration notes
- Not do
keytocard
of your primary cipher key, this should stay save on your backup media. - Always!!! backup your
$GNUPGHOME
before doingkeytocard
- not saving on quit will drop your keys anyways. - Lint (hopenpgp-tools) your pgp key with:
gpg --export <KEYID> | hokey lint
Error at adding key to agent:
⋅⋅➤ ssh-add id_ed25519
Enter passphrase for id_ed25519:
Could not add identity "id_ed25519": agent refused operation
Check path for pinentry-program /opt/homebrew/bin/pinentry-mac
in ~/.gnupg/gpg-agent.conf
Quick commands
gpg --batch --generate-key gen-params-ed25519
gpg --quick-add-key $KEYID ed25519 sign 1y
gpg --quick-add-key $KEYID ed25519 auth 1y
gpg --quick-add-key $KEYID cv25519 encrypt 1y
Security quote
Security is a team sport, and accelerating SFI isn’t just job number one for our security teams – it’s everyone’s top priority and our customers’ greatest need. If you’re faced with the tradeoff between security and another priority, your answer is clear: Do security. In some cases, this will mean prioritizing security above other things we do, such as releasing new features or providing ongoing support for legacy systems. This is key to advancing both our platform quality and capability such that we can protect the digital estates of our customers and build a safer world for all. - Satya
Source: Microsoft(😆) Blog
Passwords
Rotation
warning
A security policy to rotate passwords is a security finding in audits as NIST and BSI classified it.
NIST SP 800-63 Digital Identity Guidelines
- Authenticator and Verifier Requirements
3.1.1.2 Password Verifiers
- […]
-
- Verifiers and CSPs SHALL NOT require users to change passwords periodically. However, verifiers SHALL force a change if there is evidence of compromise of the authenticator.
Source: nist
ORP.4 Identitäts- und Berechtigungsmanagement
- ORP.4.A23 Regelung für passwortverarbeitende Anwendungen und ITSysteme (B) [IT-Betrieb] IT-Systeme oder Anwendungen SOLLTEN NUR mit einem validen Grund zum Wechsel des Passworts auffordern.
Source: BSI
Pentest
Polyglot files
With a polyglot file, you re able to compromise a file upload with restricted file-types.
cat beispiel.pdf beispiel.zip > polyglot-pdf.zip
This zip file, will be recognized as a pdf file:
$ file polyglot-pdf.zip
polyglot-pdf.zip: PDF document, [...]
If a backend just checks the content-type
its still PDF
. So if you download this file and get original file as .zip
file and extract it, you will get the pdf & zip file included there.
Split keyboard
For my first try, I build a ferris sweep with Kailh Low Profile Choc Switches, Blank MBK Choc Low Profile Keycaps and two Elite-Pi controllers from splitkb.com.
Some more details about my walkthrough this journey and its actual state:
- Get your ferris sweep pcb, got my from a friend @mberrio
- buy all the components, i.e. here splitkb.com
- solder this on your pcb, howto
After finish the hardware, you have to flash your controllers. For me its two Elite-Pi controllers on my sweep (left & right).
- install qmk and test the first compile
- create a keymap with configurator
- set handedness to elite-pi with
make CONVERT_TO=kb2040 ferris/sweep:default:uf2-split-left
make CONVERT_TO=kb2040 ferris/sweep:default:uf2-split-right
- each command creates a
.uf2
file, that the firmware file for each side to be configured once on each side - plug-in each controller (first time starts in boot mode) and copy
.uf2
to DF2 usb storage (it restarts & flash automatically) - create firmware, i.e. like this
qmk compile -kb ferris/sweep -km default -e CONVERT_TO=elite_pi
- copy created
.uf2
file to each controller
After flashing your have a running ferris sweep split keyboard, which you must now learn to love. Take a lot of time to get to know each other …
Play around with the configurator and create your own keymap.json
file. If you ready to learn, print your keymap here and start typing.
Tools:
- keybr.com
- https://monkeytype.com/
Misc
Some interesting dotfiles:
- https://github.com/webgefrickel/dotfiles #mutt
- https://github.com:frank604/scripts.git
- https://github.com/Northcode/dotfiles.git
- https://github.com:rcr/dotfiles.git
- https://github.com/ReekyMarko/dotfiles
- ishchow - lua
Cool stuff
- ASCII paint asciiflow
- Privacy sexy privacy.sexy
- Youtube (ad-free) piped
- AirDrop snapdrop
- Slide/Prasentation sli.dev
- Multi device for geeks flipper zero
- regex prime check
^.?$|^(..+?)\1+$
explain - paste over cli
curl -T example.yml -H "Content-Type: text/yaml" https://api.pastes.dev/post
- photopea - Photoshop online (free)
Trackers
- series & films: serializd / letterboxd
- books: oku / goodreads
Nix
Articles
- Nix quickstart zero-to-nix
- Tidy up your home with nix
- Github actions with nix
Emacs
Articles
Docker
Show ip addresses of running containers:
docker ps -q | xargs -n 1 docker inspect --format '{{ .NetworkSettings.Networks.frontend.IPAddress }} {{ .Name }}' | sed 's/ \// /'
Raspberry Pi
Show the model in shell cat /sys/firmware/devicetree/base/model
Kubernetes
Some security guidelines for kubernetes (OWASP)
SSH
Articles
For sharing a local dev server for public, great service from localhost.run:
ssh -R 80:localhost:3000 localhost.run
YAML get full path
cat myfile.yml | yq e '.. | select(. == "*") | {(path | join(".")): .} '
Replace passwords in gz
logile
gzip -cd rails.log.gz | sed -re 's/(\"password\"=>)(\"(.*)\",)/\1\"[FILTERed]",/g' | sed -re 's/(\"password_confirmation\"=>)(\"(.*)\")/\1\"[FILTERed]"/g' | gzip > rails.tmp
Link text on a website
Use this syntax to link to specific text:
https://example.com/page.html#:~:text=[prefix-,]textStart[,textEnd][,-suffix]
i.e. this
# highlight
https://developer.mozilla.org/en-US/docs/Web/URI/Fragment/Text_fragments#:~:text=without%20relying%20on%20the%20presence%20of%20IDs
# multiple texts
https://developer.mozilla.org/en-US/docs/Web/URI/Fragment/Text_fragments#:~:text=using%20particular&text=it%20allows
# fragments
https://developer.mozilla.org/en-US/docs/Web/URI/Fragment/Text_fragments#:~:text=using%20particular,don't%20control
Source: alfy.blog
Ed cheatsheet
Navigating
Line number: go to that line and print it.
pn - Print current line and line number.
3kxe - mark line 3 as "xe".
'xep - print the line marked as xe.
Editing
a - start editing after the current line.
i - start editing before the current line.
c - replace the current line.
end the editing with only a period on a line (.).
1d - delete line 1.
1,2j - join line one and two.
Printing
1,$p - print entire buffer.
,p - also prints the entire buffer.
2,3p - print lines 2 and 3.
.,4p - print from the current line (.) to line 4.
-1,+1p - print 1 line above and 1 line below the current line.
Buffer operations
2t4 - Copy line 2 to after line 4.
2t$ - Copy line 2 to the end of the file.
3m6 - Move line 3 to after line 6.
2,4m$ - Move lines 2 to 4 to the end of the file.
Searching / replace
/like - Move to the next line after the current one matching regular expression /like.
?Like - Search backwards.
1s/re/jo - Substitute only the first occurence of re with jo on line 1.
1s/re/jo/g - Substitute all occurences of re with jo on line 1.
1,$s/re/jo/g - Substitute all occurences of re with jo in the whole buffer.
Regular expresions
g/re/p - print all the lines matching regular expression /re/.
v/re/p - print all the lines NOT matching regular expression /re/.
g/re/m$ - move all the lines matching regular expression /re/ to the end of the file.
Reading and writing
w file.txt - Save the current buffer as filename file.txt.
w - Save the current buffer if the file is already saved.
w1,4 - Save lines 1 to 4 to the current buffer.
W - append to a file (not replace).
r /etc/hosts - Insert the contents of /etc/hosts after the current line.
r !ps -e - Insert the output of the command "ps -e" after the current line.
e file.txt - Open the file file.txt and replace the current buffer.
Generate qrcode in terminal
qrencode -m 2 -t utf8 < file.conf
MacOS Brew install older version
- You create a local “tap” - which I assume is something like a local brew repository
- You extract the desired version of the package into this local tap
- You install your local tap
# use $USER variable to mimick userName/repoName structure
# this does not actually create any git repositories
# 1. create a new tap
brew tap-new $USER/local-<packageName>
# 2. extract into local tap
brew extract --version=1.2.3 <packageName> $USER/local-<packageName>
# 3. run brew install@version as usual
brew install <packageName>@1.2.3
If not found:
# list all local taps
brew tap
# go to tap and check out correct hash
cd /usr/local/Homebrew/Library/Taps/<packageName>
git checkout <hash>
# prevent brew from checking out different hash
HOMEBREW_NO_AUTO_UPDATE=1 brew install <packageName>
# can list and switch between all versions
brew list --versions
brew switch <packageName> <version>
target="_blank"
vulnerability
Add always rel="noopener noreferrer"
to target="_blank"
links, because of:
MacOS
Shutdown without confirmation from terminal:
osascript -e 'tell app "System Events" to shut down'
Source: Stackexchange
Wireguard
Setup wireguard with good explanations: What They Don’t Tell You About Setting Up A WireGuard VPN
# Generate keys in /etc/wireguard
cd /etc/wireguard
wg genkey | tee privatekey | wg pubkey > publickey
# /etc/wireguard/wg0.conf on the server
[Interface]
Address = 10.0.0.1/24
ListenPort = 51820
# Use your own private key, from /etc/wireguard/privatekey
PrivateKey = WCzcoJZaxurBVM/wO1ogMZgg5O5W12ON94p38ci+zG4=
[Peer]
# VPN client's public key
PublicKey = lIINA9aXWqLzbkApDsg3cpQ3m4LnPS0OXogSasNW5RY=
# VPN client's IP address in the VPN
AllowedIPs = 10.0.0.8/32
Relaying traffic
# /etc/sysctl.conf
net.ipv4.ip_forward=1
# Then apply the settings by running:
sysctl -p
Client config:
# /etc/wireguard/wg0.conf on the client
[Interface]
# The address your computer will use on the VPN
Address = 10.0.0.8/32# Load your privatekey from file
PostUp = wg set %i private-key /etc/wireguard/privatekey
# Also ping the vpn server to ensure the tunnel is initialized
PostUp = ping -c1 10.0.0.1[Peer]
# VPN server's wireguard public key (USE YOURS!)
PublicKey = CcZHeaO08z55/x3FXdsSGmOQvZG32SvHlrwHnsWlGTs=# Public IP address of your VPN server (USE YOURS!)
# Use the floating IP address if you created one for your VPN server
Endpoint = 123.123.123.123:51820# 10.0.0.0/24 is the VPN subnet
AllowedIPs = 10.0.0.0/24# To also accept and send traffic to a VPC subnet at 10.110.0.0/20
# AllowedIPs = 10.0.0.0/24,10.110.0.0/20# To accept traffic from and send traffic to any IP address through the VPN
# AllowedIPs = 0.0.0.0/0# To keep a connection open from the server to this client
# (Use if you're behind a NAT, e.g. on a home network, and
# want peers to be able to connect to you.)
# PersistentKeepalive = 25
NGINX config
Some nginx features for developers.
Redirect a domain to localhost dev server:
user nginx;
worker_processes auto;
events {}
http {
access_log /var/log/nginx/access.log combined;
# include /etc/nginx/conf.d/*.conf;
upstream backend {
server backend.local:10000;
}
server {
server_name proxy.local;
listen 8000;
location / {
proxy_pass http://backend;
}
}
}
Source: Nice nginx features for developers
Compressed response
Using with curl -H 'Accept-encoding: gzip' localhost:8080/ping | gunzip -
or curl --compressed https://ashishb.net
.
Allow Accept-encoding: gzip
with config:
http {
...
server {
...
gzip on;
gzip_min_length 1000;
...
}
}
Source: ashishb.net
FLoC blocking
Block FLoC within traefik:
# traefik.toml
[http.middlewares]
[http.middlewares.floc.headers]
[http.middlewares.floc.headers.customResponseHeaders]
Permissions-Policy = "interest-cohort=()"
Source: Paramdeo Singh - Opting your Website out of Google’s FLoC Network
Create QR-Code for your wifi
Source qrencode -o wifi.png "WIFI:T:WPA;S:<SSID>;P:<PASSWORD>;;"
Security book
A most recommended it security book: Book
Linux hardening book
How to harden alinux system guide: Book
Custom sortation of database entries
Found an good article about, how handle the custom sortation of entires in sql database. TL;DR just add an column pos
to the table and auto-increment this value. If insert an entry between of some rows, just calculate the new position for this entry like: ((pos n-1 + pos n+1) / 2
i.e.:
| names | pos | | peter | 1 | | tom | 2 | | harry | 2.5 | | ben | 3 |
begriffs.com - User defined order
OWASP 10 most critical security issues for web applications
Some notes of: OWASP Top 10 - heise from Tobias Glemser Authentication: OWASP Authentication Cheat sheet
Content:
- Einführung in relevante Organisationen
- Beispiele in der öffentlichen Wahrnehmung
- Die zehn häufigsten Sicherheitsrisiken bei Webanwendungen – OWASP Top 10 (u. a. SQLInjection, Cross-Site-Scripting, CSRF, Denial-of-Service)
- Interaktive Demonstrationen zu allen Risiken
- Aufzeigen der Auswirkungen
- Passende Beispiele mit realem Bezug
- Vorstellung von Prüfwerkzeugen und Methoden bei der Prüfung in Form von Penetrationstests
Notes:
- XSS bei eBay -> Haftung? Gesetzt sagt: Stand der Technik einhalten!
- OWASP SAMM/Cheat Sheet anschauen
- Pentest sicher/unsicher? Keine eindeutige Aussage, da Momentaufnahme!
- Security Beauftragter muss Fragen stellen um die Kommunikation anzuregen
- Entwickler tragen keine Verantwortung, wenn Sicherheitsaspekte nicht berücksichtigt werden
- Masche aus Maßnahmen zur Bekämpfung von Risiken schmählern die Gefahr
- Verarbeitung von Kreditkartendaten gesetzl. jährl. Pentest
- OWASP Ressourcen: Web security testing guide, OWASP-BWA - Test machine, ZAP, Juice-Shop
- Angriffe:
- Injection
- SQL, LDAP, OS-commands -> backend
- XSS -> frontend
- sqlmap /
Mc O'Caml
test
- Broken Authentication
- sessionId in GET
- nur sessionId als Authorisierung
- login brute-force verhindern
- Sesitive data sxposure
- backup files im www dir
- keine durchgängige Verschlüsslung
- XML External Entities (XXE)
- SOAP API
- Broken access control
- Zugriff auf Dateien
?page=/etc/passwd
- per ID auf Daten dritter zugreifen
- Zugriff auf Dateien
- Security misconfiguration
- Härtung der Infrastruktur
- update von 3rd party libs
- default accounts beachten
- XSS Cross-site-scriting
- js injection auf website
- Insecure deserialization
- parser libs updaten!
- Insufficient logging & monitoring
- fehlerhafte login Versuche
- Transaktionen protokollieren
- Injection
Eingabe im frontend & backend! validieren vor API Aufruf!
Trivia:
- Geheime Botschaften by Simon Singh (Buch)
- Mr. Robot (Serie)
- Hackers (Film)
- Iron Sky (Film)
<footer id="last-change">Last change: 2024-11-23, commit: <a href="https://github.com/dvogt23/notes/commit/27af66b">27af66b</a></footer>
Favorit songs:
- Grover Washington Jr - Just the Two of Us
- Lydie Auvray - Couscous
- Egor Kreed - Самая самая
- Stephane Wrembel - Bistro Fada
- Adana Twins - Strange
- La Marina - Cuffin’ season (Remix) [feat. Fabolous]
- Harry Nilsson - One
- Bill Withers - Lean on Me
- Nôze - Marabout
- Coldplay - Hymn for the Weekend
- Frank Ocean - Pink Matter
- I Monster - Daydream In Blue
- Kid Cudi - Releaser
- Kid Cudi - Swim In The Light
- Kid Cudi - Frequency
- Rae Sremmurd - Black Beatles
- Petit Biscuit - Sunset Lover
- Jon Bellion - All Time Low
- Imagine Dragons - Believer
- Michael Kiwanuka - One More Night
- Michael Kiwanuka - Love & Hate
- Michael Kiwanuka - Cold Little Heart
- Jah Khalib - Ты словно целая вселенная
- Грибы - Тает лёд
- Ulrich Tukur & Die Rhythmus Boys - Morphium
- Anitta - Vai malandra (feat. Tropkillaz & DJ Yuri Martins)
- Indila - Dernière danse
- Yves Montand - Bella Ciao
- Manu Chao - Me Gustas Tu
- Manu Chao - Bongo Bong
- Pyotr Ilyich Tchaikovsky - The Seasons, Op. 37a: II. February. Carnival
- Lluni - King
- George Davidson - Mariage D’Amour
- Dendemann - Keine Parolen
- John Legend - Green Light (feat. André 3000)
- sean - Mercutio
- Deichkind - Richtig Gutes Zeug
- Evelyn Stein - Quiet Resource
- Zaz - Pourquoi tu joues faux
- Max Girko - Иди За Второй
- Zemlyane - The grass near the house
- Mark Eliyahu - Endless
- Old Man Canyon - Phantoms and Friends
- Estelle - American Boy
- Michael Kiwanuka - Solid Ground
- RIN - Monica Bellucci
- Eminem - Marsh
- MoTrip - Changed - Aus Sing meinen Song, Vol. 7
- Tima Belorusskih - Одуванчик
- Omega - Pegao / Me Miro y La Mire (TikTok Hit)
- Timati - Звездопад
- Kanye West - Nah Nah Nah
- Shuggie Otis - Aht Uh Mi Hed
- Toše Proeski - Nesanica
- Ensemble Vanya - Russian Cyberfolk Song
- Zaz - Je veux
- Gorillaz - Feel Good Inc.
Books
Here is a list of books I read in the past, after school. My favorit genre are non-fiction books and biographies.
Read-list
- Die Rothschilds. Des Hauses Aufstieg, Blütezeit und Erbe
- The Luck of Barry Lyndon
- Das trunkene Schiff
- The Invisible Man
- Der Spieler
- Das Schneckenhaus by Mustafa Khalifa
2024
Trotzdem Ja zum Leben sagen: Ein Psychologe erlebt das Konzentrationslager by Viktor E. Frankl ISBN: 978-3328102779 ⭐ ⭐ ⭐ ⭐ ⭐
Elon Musk by Walter Isaacson ISBN: 978-1982181284 ⭐ ⭐ ⭐ ⭐
2023
Das Mittelalter: Europa von 500 bis 1500 by Chris Wickham ISBN: 978-3608962086 ⭐ ⭐ ⭐
Monsieur Ibrahim und die Blumen des Koran by Eric-Emmanuel Schmitt ISBN: 978-3-25-060055-8 ⭐ ⭐ ⭐
Das Neue Alphabet. Russische Lesebücher. by Lew Tolstoi ISBN: - ⭐ ⭐ ⭐
Der Prozess by Franz Kafka ISBN: 978-3-10-038190-3 ⭐ ⭐ ⭐
2022
Imperium USA by Daniele Ganser ISBN: 978-3-946778-27-1 ⭐ ⭐ ⭐ ⭐
US-Offiziere wie General Butler wissen, dass der US-Imperialismus in Lateinamerika rücksichtslos wütete. »Von 1909 bis 1912 war ich an der Säuberung Nicaraguas für das internationale Bankhaus Brown Brothers beteiligt«, erinnert sich Butler. »1916 habe ich den amerikanischen Zucker-baronen die Dominikanische Republik serviert. In China half ich, dafür zu sorgen, dass Standard Oil ungestört seinen Geschäften nachgehen konnte. In diesen Jahren hatte ich, wie die Jungs in den Hinterzimmern sagen würden, eine prächtige Gangsterbande am Laufen. Wenn ich so zurückblicke, glaube ich, dass ich Al Capone ein paar Tipps hätte geben können. Er schaffte es gerade einmal, mit seiner Bande in drei Bezirken zu operieren. Ich operierte auf drei Kontinenten.«
Black Elk, der Medizinmann der Oglala Sioux, war ein Vertreter der Friedensbewegung und beschrieb diese Verbundenheit mit der Mensch-heitsfamilie so: »Der erste Friede - der wichtigste - ist der, welcher in die Seelen der Menschen einzieht, wenn sie ihre Verwandtschaft, ihre Harmonie mit dem Universum einsehen und wissen, dass im Mittelpunkt der Welt das große Geheimnis wohnt, und dass diese Mitte tatsächlich überall ist. Sie ist in jedem von uns - dies ist der wirkliche Friede, alle anderen sind lediglich Spiegelungen davon. Der zweite Friede ist der, welcher zwischen Einzelnen geschlossen wird, und der dritte ist der zwischen Völkern. Aber vor allem sollt ihr sehen, dass es nie Frieden zwischen Völkern geben kann, wenn nicht der erste Friede vorhanden ist, der, wie ich schon sagte, innerhalb der Menschenseele wohnt.«
Einzeln sein by Rüdiger Safranski ISBN: 978-3-446-25671-2 ⭐ ⭐ ⭐ ⭐
Das ist die Pointe des Ganzen: Der Sinn von Sein ist die Zeit. Es gibt nichts Beharrendes. Wenn der Sinn von Sein die Zeit ist, so heißt das: Keine übergreifende Idee, kein Gott, kein Ziel der Geschichte und so fort verbürgen diesen Sinn, wie das in der Tradition üblich ist. Es bleibt die Zeit, die zwar nicht aufhört, aber in der wir aufhören, weil wir befristet sind. Unsere Zeit ist die befristete, die tödliche Zeit.
Der Denkende ist zwar vereinzelt, aber nicht einsam, denn er bleibt in Gesellschaft - mit sich selbst. Denken, so Hannah Arendt, ist mit der Erfahrung des inneren Gesprächs mit sich selbst verbunden: Das Denken ist, existentiell gesehen, etwas, das man allein tut, aber nicht einsam: allein sein heißt mit sich selbst umgehen; einsam sein heißt alleine sein, ohne sich in das Zwei-in-einem aufspalten zu können, ohne sich selbst Gesellschaft leisten zu können.
Dieser Vergleichszwang begünstigt zwar Wettbewerb und Konkurrenz und damit das Streben nach überbietender Originalität, doch es entstehen eben auch neue Anpassungszwänge. Der Vergleichshorizont weitet sich, und es wird immer schwieriger, für sich selbst Maßstäbe und Orientierungen zu finden. In Anbetracht der vielen Möglichkeiten und Angebote ist das Eigene, was immer es bedeuten mag, in Ge-fahr, entwertet zu werden. Und so schließt man sich eben einer Kohorte an und übernimmt die dort maßgeblichen Standards beim Lebens-stil, bei Meinungen und Uberzeugungen.
2020
21 Lektionen by Yuval Noah Harari ISBN: 978-3406739682 ⭐ ⭐ ⭐ ⭐
-
Ein gutes Buch über die aktuellen Gegebenheiten in der Welt. Und sehr viel pro westl. Politik ohne Reflektion.
Was also sollten wir unterrichten? Zahlreiche Fachpädagogen behaupten, Schulen sollten sich auf die Vermittlung der vier Ks verlegen kritisches Denken, Kommunikation, Kollaboration und Kreativität. Allgemeiner sollten Schulen weniger Wert auf technisches Können legen und stattdessen universell anwendbare Lebensfertigkeiten in den Mittelpunkt rücken. Am allerwichtigsten wird die Fähigkeit sein, mit Veränderung umzugehen, neue Dinge zu lernen und in unvertrauten Situationen das seelische Gleichgewicht zu wahren. Wollen wir mit der Welt des Jahres 2050 Schritt halten, müssen wir nicht nur neue Ideen und Produkte erfinden wir müssen vor allem uns selbst immer wieder neu erfinden.“
Den Menschen wurde von frühester Kindheit an beigebracht, an die Erzählung zu glauben. Sie hören sie von ihren Eltern, ihren Lehrern, ihren Nachbarn und der allgemeinen Kultur lange, bevor sie die geistige und emotionale Unabhängigkeit entwickeln, die notwendig ist, um solche Geschichten zu hinterfragen und auf ihren Wahrheitsgehalt zu überprüfen. Zu der Zeit, da ihr Intellekt heranreift, sind sie so sehr in diese Erzählung eingebunden, dass sie ihren Verstand eher dazu nutzen, sie rational zu begründen als sie anzuzweifeln. Die meisten Menschen, die auf ldentitätssuche gehen, sind wie Kinder, die sich auf Schatzsuche begeben. Sie finden nur, was ihre Eltern zuvor für sie versteckt haben.
Ein Gentleman in Moskau by Amor Towles ISBN: 978-3548290720 ⭐ ⭐ ⭐ ⭐
- review
In guten wie in schlechten Tagen by Tayari Jones ISBN: 978-3716040256 ⭐⭐⭐
- review
2019
Schlaf nicht wenn es dunkel wird by Joy Fielding
ISBN: 978-3-442-46173-8 ⭐⭐⭐
- review
Gespräch mit Freunden by Sally Rooney
ISBN: 978-3-630-87541-5 ⭐⭐
- review
The big five for life by John Strelecky
ISBN: 978-3423345286 ⭐⭐⭐
- review
GRM - Brainfuck by Sibylle Berg
ISBN: 978-3462051438 ⭐⭐⭐⭐⭐
- review
Blechtrommel by Güter Grass
ISBN: 978-3423118217 ⭐⭐⭐
- review
Auf die Bäume ihr Affen by Hans A. Pestalozzi
ISBN: 978-3729603134 ⭐⭐⭐⭐⭐
This book is the best retrospective view of the last few years in a political and social point of view. The author is so clear and straight forward in pointing to the causes of our all prblem situations in the current time of life.
Jäger, Hirten, Kritiker by Richard David Precht
ISBN: 978-3442315017 ⭐⭐⭐
A very good insight into the future problems and obstacles of today’s society and possible solutions to counter them. Somewhat too superficial and predictable.
2018
Warum dänische Kinder glücklicher und ausgeglichener sind: Die Erziehungsgeheimnisse des glücklichsten Volks der Welt by Jessica Joelle Alexander (Autor), Iben Dissing Sandahl (Autor), Karin Wirth (Übersetzer) ISBN:978-3442393213 ⭐⭐⭐⭐⭐
- review
Just for fun (Linus Torvalds) by David Diamond
ISBN: 978-3423362993 ⭐⭐⭐⭐
A really good book in an interview perspective. Linus Torvals tells how he was creating Linux with some nerdy details and how her workflow was/is in maintaining the best operating system in this world.
Neustart by Stephan Urbach
ISBN: 978-3426787298 ⭐⭐⭐⭐
- review
Eine Einführung - Einflüsse, Machtstrukturen und Selbstheilung im 21. Jahrhundert by Vinoth Müller
ISBN: 978-3741877537 ⭐⭐
This book written by a “hobby” author who is burning for this topic and all that goes with it. It was really hard read it, cause it seems to be very unstructured and the inexperience of the author makes it difficult to read it as well.
The great Gatsby by F. Scott Fitzgerald
ISBN: 978-3150092422 ⭐⭐⭐
Really good written old love story.
2017
Psychologie der Massen by Gustave Le Bon
ISBN: 978-3868200263 ⭐⭐⭐⭐
Very good and concise book about the psychology of people who are influenced by the masses.
Ansichten eines Clowns by Heinrich Böll
ISBN: 978-3423004008 ⭐⭐
- review
Hundsköpfe by Morten Ramsland
ISBN: 978-3442736294 ⭐⭐
- review
Deutsch sein und schwarz dazu by Theodor Michael
ISBN: 978-3423348577 ⭐⭐⭐⭐
A really good biogrophie of a african migrant at the beginning of the 19 century in germany and his experiences with racism in the epoch.
Elon Musk by Ashlee Vance & Elon Musk
ISBN: 978-3898799065 ⭐⭐⭐
- review
1984 by George Orwell
ISBN: 978-3548225623 ⭐⭐⭐⭐
- review
Past
Anna Karenina by Tolstoi
ISBN: 978-3491961968 ⭐⭐⭐⭐
- review
Das glücklichste Volk - Sieben Jahre bei den Pirahã-Indianern am Amazonas by Daniel Everett
ISBN: 978-3421043078 ⭐⭐⭐⭐
- review
Das Tahiti Projekt by Dirk C. Fleck
ISBN: 978-3492253628 ⭐⭐⭐
A futuristic utopia of a society in the future simulated on an island.
Kopf schlägt Kapital by Günter Faltin
ISBN: 978-3423347570 ⭐⭐⭐
- review
Die Google Falle by Gerald Reischl
ISBN: 978-3800073238 ⭐⭐⭐
Very superficial development history of google and the processes of a powerful software group.
Glück by Eckart von Hirschhausen
ISBN: 978-3499623554 ⭐⭐
- review
My list of interesting podcasts:
- Was bisher geschah - Geschichtspodcast
- Alles Geschichte - History von radioWissen
- Darknet dairies
- Zeit Verbrechen
- SWR2 Wissen
- Daily Quarks
- Hotel Matze
- Fest & Flauschig
- Gemischtes Hack
- The Joe Rogan experience
- Eine Stunde history
- 100 Sekunden Wissen
- Das Ziel ist im Weg
- Betreutes Fühlen
- In extremen Köpfen
- Alternativlos
- Grenzgänger
History of podcast listening:
- Hazel & Thomas Gast: Usus Mango
- Elke Heidenreich eine gute Produzentin beim WDR
- Die Ernsthaftigkeit Deutschlands den Rassismus zu bekämpfen mit der AFD im Bundestag und einer #metoo Bewegung ohne einer Konsequenz für jemanden
- Betreutes Fühlen - Deine Chance im Stimmungstief
- eine Medizintablette Einnahme auf der rechte Seite liegend, erreicht 10x schneller das Ziel im Körper um zu Wirken.
- Betreutes Fühlen - Machen Krisen stark?
- ertwarte nicht von jeder Krise ein Wachstum oder positiven Impact an dich selbst, da oft gesagt wird, wenn jemand erfolgreich ist, dass der jenige etwas schlimmes/traumatisches erlebt hat und daraus Kraft gezogen hat. Es reicht bewiesenermaßen auch jemand der an dich glaubt und dich in deinem Vorhaben unterstützt. Es muss zum Erfolg nicht etwas negatives wiederfahren sein… (eigene Zusammenfassung des Dialogs der beiden Hosts)
Series
Some of my favourite series:
Movies
Absolute favourite movies:
- Lucky number slevin
- Good will hunting
- Most of the “old” movies from Guy Ritchie
Videos
-
SWR Der mit dem Wald spricht - Peter Wohlleben Gast: Marc Marshall & Jana Palaske Video
Nur 3% der deutschen Wälder sind im Ursprung echt, alles andere sind “Plantagen”.
Der Baum ist im Wald nur der Zeiger einer Uhr, da die ganzen Tiere & Insekten meist ausgeblendet werden.
-
Youtube Grenzgänger - Shayan Garcia trifft Aufspürerin Video
Die Vergnügungsmaschine der kapitalistischen Kultur versucht jedes Gefühl für unsere Geschichte zu eliminieren. Damit die Gegenwart zu einer dauerhaften Wiederholung des hedonistischen Moments verkommt (nur auf das eigene Glück aussein) Das Gefangensein im immer Gleichen fördert nicht nur die Geschichtsvergessenheit, sondern auch die Ablehnung einer alternativen Zukunftsvision. Besonders junge Menschen sind heute im Kreislauf einer sofortigen Triebbefriedigung gefangen. Sie leben in einem Dauerrausch, es ist nicht nur die Sucht nach Sex und Drogen verbreitetet, sondern auch die Sucht nach Status und Erfolg. Die Sucht nach einer hohen Sichtbarkeit und Resonanz. In den kapitalistischen Zivilisationen ist gegen die Seelen der Jugendlichen ein Kampf zugange. Sie werden so dermassen abgestumpft, damit aus ihnen keine Wahrheitssucher und Kämpfer für Gerechtigkeit werden - Prof. Cornel West
Articles
- republik - Herr Drosten, woher kam dieses Virus?
-
Marderhunden und Schleichkatzen wird lebendig das Fell über die Ohren gezogen. Die stossen Todesschreie aus und brüllen, und dabei kommen Aerosole zustande. Dabei kann sich dann der Mensch mit dem Virus anstecken. Diese Tiere waren bei Sars-1 eindeutig die Quelle. Das ist wissenschaftlich belegt.
-
Das Kamel als religiöses Opfertier hat eine lange Tradition, eine sehr hohe Wertigkeit. Aber es kostet auch sehr viel Geld. Arme religiöse Menschen nehmen stattdessen Schafe. Aber je mehr Leute in jener Region reich wurden, umso mehr Kamele wurden geopfert. So werden heute beispielsweise zur Hadsch-Saison auf der Arabischen Halbinsel allein als Opfertiere jedes Jahr 40’000 Kamele geschlachtet. Das hat es vor fünfzig Jahren noch nicht einmal in Ansätzen gegeben. Letztlich, wo auch immer auf der Welt, geht es um die Modifikation von natürlichen Systemen: Eine grosse Nutztierpopulation an irgendeinem Ort ist immer etwas Künstliches.
-
Alle, die sich nicht impfen lassen, werden sich mit Sars-2 infizieren. Der Begriff Herdenimmunität stammt aus der Veterinärmedizin, wo man sich in früheren Jahren tatsächlich solche Überlegungen gemacht hat, zum Beispiel beim Rinderpestvirus, dem Masernvirus der Rinder. Hochübertragbar, aber durch eine Impfung lebenslang abzuhalten. Da kann man eben dann wirklich solche Rechnungen anstellen: Wir haben einen Nutztierbestand, der ist in sich abgeschlossen – wie viele von den Tieren müssen wir jetzt impfen, damit das Virus nicht zirkulieren kann?
-
False balance? Dass man sagt: Okay, hier ist eine Mehrheitsmeinung, die wird von hundert Wissenschaftlern vertreten. Aber dann gibt es da noch diese zwei Wissenschaftler, die eine gegenteilige These vertreten. In der medialen Präsentation aber stellt man dann einen von diesen hundert gegen einen von diesen zweien. Und dann sieht das so aus, als wäre das 50:50, ein Meinungskonflikt. Und dann passiert das, was eigentlich das Problem daran ist, nämlich dass die Politik sagt: «Na ja, dann wird die Wahrheit in der Mitte liegen.» Das ist dieser falsche Kompromiss in der Mitte.
-
Blogs
Here is a collection of my rss subscriptions:
- Lobsters - rss
- Realitätsabzweig - blog
- Zeitgeschehen im Fokus - blog
- heise Developer - Neueste Meldungen - rss
- netzpolitik.org - rss
- D. Kriesel - rss
- Fefes Blog - rss
- Graham Stevens – Grh.am - rss
- Hrvoje Šimić - rss
- Herman J. Radtke III Blog - rss
- Arkency - rss
- kevq.uk - rss
- huy.rocks - rss
- Julia Evans - rss
- Llogiq on stuff - rss
- Pro-Linux News - rss
- SupeRails blog - rss
- This Week In Neovim - rss
- Trends der Zukunft - rss
- Neil Kakkar - rss
- Google Scholar - Suche
- dblp
- Springer nature - open science
- Uni Trier
- Papers we Love
- 2 Minute Papers - Youtube
- SIG Conferences / Conference ranking
- Elicit
- SciSpace
Furniture
Livingroom
- Dinner table
- Turntable
- Plants
- Seats
Kitchen
- Esspresso machine rommelsbacher
- Espresso machine gaggia classic
- Breville
- Bezzera BZ10
- Waterfilter alb bestelemenst
- Calendar Saisonkalender
Office
- Wilkhan Rider chair/bumper
Interesting
- Design torquato
- Classics pamono
- Prints independentrepublic
- Furniture articture
- Vivense
- Homeloo
- postera.art
Wardrobe
Electro
Art
Roof
Indoor gardening
Outdoor
Clothing
Cooking
Brot backen
Sauerteig:
-
75 g Mehl (zum Beispiel Dinkel- oder Roggenmehl)
-
75 ml lauwarmes Wasser
-
2 große Einmachgläser mit je mindestens 1,5 Liter (gibt es z.B. bei ** oder **Amazon), auf dem der Deckel locker aufsitzt und noch Luft durchlässt
-
einen Holzlöffel
-
Am ersten Tag gibst du 75 Gramm Mehl und 75 Milliliter lauwarmes Wasser in das Einmachglas und rührst mit dem Holzlöffel gut um. Der Teig sollte, wie ein Waffelteig, leicht flüssig sein.
-
Setze den Deckel (ohne Gummiring und ohne Klammern – der Sauerteig benötigt Luft) auf das Glas und stelle es an einen warmen Ort. Die optimale Temperatur für die Gärung beträgt zwischen 25 und 35 Grad Celsius.
-
Lasse den Teig für zwölf Stunden ruhen und rühre ihn dann mit dem Holzlöffel erneut gründlich um. Lasse ihn danach wieder für zwölf Stunden ruhen.
-
Gib vom zweiten bis zum vierten Tag täglich 75 Gramm Mehl und 75 Milliliter lauwarmes Wasser hinzu, rühre den Teig gut um und lasse ihn wieder 24 Stunden ruhen.
-
Am fünften Tag ist der Sauerteig fertig zum Weiterverarbeiten und du kannst nach dem folgenden Rezept Brot backen.
Brot:
-
400g Sauerteig
-
600g Mehl
-
250 bis 450ml lauwarmes Wasser (je nach Mehltyp, Vollkornmehl benötigt mehr Wasser als Auszugsmehl)
-
1 EL Salz
-
Rührschüssel
-
Holzlöffel
-
deine Hände oder eine Küchenmaschine
-
große Backform (zum Beispiel bei **Memolife) oder Backblech für den Laib
-
Butter oder Pflanzenöl zum Einfetten von Form/Blech
-
hitzebeständiges Gefäß mit Wasser (zum Beispiel eine Auflaufform)
-
Messer
-
Gib alle Zutaten in die Schüssel und rühre kräftig um.
-
Wenn der Teig eine schön feste Konsistenz hat und nicht an deinen Fingern kleben bleibt, fange an, den Teig für einige Minuten gründlich zu kneten. Mache dies entweder per Hand oder lasse deine Küchenmaschine für dich arbeiten.
-
Forme nach dem Kneten einen Laib aus dem Teig. Du kannst einen runden/ovalen Laib formen und auf das Backblech geben oder eine gefettete Backform nutzen.
-
Lasse den Brotrohling nun knapp eine Stunde im warmen Backofen bei 35 Grad Celsius gehen. Heize dafür den Backofen auf 50 Grad vor, stelle ihn wieder aus und gib den Rohling hinein. So geht der Sauerteig in der Restwärme ohne zu viel Energieaufwand.
-
Nimm nach einer Stunde den Rohling heraus, stelle den Ofen auf 175 Grad Umluft und gib die Auflaufform mit dem Wasser unten in den Backofen. Durch die Zugabe des Wassers wird das Brot nicht zu trocken und es bildet sich beim Backen eine schöne Kruste auf deinem Brot.
-
Schneide deinen Brotrohling nun an mehreren Stellen quer über der Oberfläche ein.
-
Gib den Rohling in den heißen Backofen und backe ihn für circa 45 Minuten.
Source: utopia
Pizza recipe
Basically you could use each pizza dough calculator on the internet. I actually prefer the oni app with 63% hydration for an home oven.
Neapolitan 6pcs:
24h:
- 1000g flour (caputo)
- 620ml water
- 3g dry east
- 30g salt
Neapolitan 10pcs:
Poolish (16-24h):
- 300ml water
- 5g dry yeast (fresh 10g)
- 5g honey
- 300g flour 00
Dough:
- 700ml water
- poolish (all)
- 40g sea salt
- 1250g flour
Neapolitan:
- 500g Mehl
- 350g Wasser (kalt)
- 15g Salz
- 0.5g Hefe
16h bei Zimmertemperatur, 270g große Teiglinge, dann 6h Zimmertemperatur
Mehl und Wasser kurz verrühren und 20-30 Minuten abgedeckt stehen lassen. Anschließend Hefe und Salz zugeben und mit dem Knethaken der Küchenmaschine 5-8 Minuten auf langsamer Stufe, dann 8-10 Minuten auf zweiter Stufe zu einem elastischen Teig auskneten. Der Teig ist ausgeknetet, wenn er sich ohne zu reißen in die Länge ziehen lässt (Fenstertest). Den Teig für 18-48 Stunden luftdicht verschlossen im Kühlschrank reifen lassen. Je länger er reift, desto aromatischer und großpori- ger wird am Ende die Pizza. Den Teig aus dem Kühlschrank neh- men, in vier gleich schwere Stücke teilen. Zu Kugeln formen, gut abdecken oder verschließen und etwa 4 Stunden bei Raumtempe- ratur gehen lassen, bis sich das Volumen deutlich vergrößert hat. Mindestens 30 Minuten vor dem Backen: Den Backofen mit Kera- mikbackstein auf 275 °C Ober-/Unterhitze vorheizen. Tomaten, Salz und Olivenöl mit den Händen zu einer stückigen Soße zerdrü- cken. Basilikum waschen, trockenschütteln, etwa 2/3 der Blätt- chen grob zerrupfen und untermengen.
Egg salad
- 10 Eier
- 250 gr. Mayo
- 1 Tl Senf
- 5 gr. Zucker
- 1 Tl. Salz
- Prise Pfeffer
- Schnittlauch nach Bedarf
Pfannkuchen
FÜR DEN TEIG (15 Stk.)
- 375 g Weizenmehl (Type 405)
- 3 - 4½ EL Zucker
- 3 TL Backpulver
- 1½ Prisen Salz
- 3 Eier (Gr. M)
- 300 ml Milch
Coffee
I love to drin k good coffee, especially from an espresso machine. Have my own for a few months and been happy to learn doing great extractions.
Good coffee brands:
- Hausbrandt (Venecia)
- Julius Meinl
- Cofymi
Garden
Basic
- Some basic garden Indoor gardening
Teracce
- Roofing TUI Maximaal
Trees
- Artmeyer Gartenbaumschule regional tree selling shop
Garage
Electro connection
“Elektroinstallation auf 10 A Dauerlast prüfen in der Garage ist ohnehin eine gute Idee, weil Stromanschlüsse in Garagen gern gepfuscht werden.” - Source
Pharmacy
Our home pharmacy list should always be available:
- Antimückenspray
- Autan
- Erbrechen
- Vomex
- Erkältung
- Grippostad
- Halsschmerzen
- Dobendan Strepsis Synergie Honig & Zitrone
- Husten
- Mucosolvan
- Kopfschmerzen
- Paracetamol
- Krampf
- Buscopan
- Magen-Darm
- Iberogast
- Mandelentzündung
- Tantum Verde Spray
- Tonsipret Tabletten
- Nasenspray
- Nasic+
- Orthomol
- Immun
- Schmerz-/Fieber
- Ibuprofen 400
- Stiche
- Fenistil
- Wunde
- Bepanthen
Kids:
- Blähungen
- Lefax Pumpliquid
- Durchfall
- Elektrolyte Elotrans
- Elektrolyte Oralpädon 240 Erdbeere
- Loperamid
- Fieber
- Paracetamol Zäpfchen
- Nurofen Saft
- Ohrentropfen
- Otalgan
- Schmerz
- Voltaren
- Schnupfen
- Kochsalzlösung 0,9% Ampullen
- Nasivin für Babys (Kochsalz nicht hilft)
- Verstopfung
- Babylax oder Glycilax Zäpfchen
- Movicol
- Zahnbeschwerden
- Dentinox Gel
Homestead
The most important point for building or buy your own house is to have the garden in south direction.
Doorbell
Self-made
If you want to try to do it yourself:
Kanalization
Kids
Lifehacks
Elternschaft ist schon eine lustige Sache. Du versuchst etwas zu tun, von dem niemand jemals wusste, wie man es richtig macht. Aber du willst dein Bestes geben! Also was kannst du am besten tun? Das Erste ist, ein wenig an sich selbst zu arbeiten. Verbringe genügend Zeit mit dir selbst. Schau dich genau an: Wie du bist, wie du sitzt, wie du stehst, wie du sprichst, was du machst, was du nicht machst. Ich denke, man muss sich selbst sehr genau betrachten. Denn die Kinder erfassen alles schnell und sie werden das, was du tust, verstärken. Eines der wichtigsten Dinge ist, sich zumindest so zu gestalten, wie man sein möchte. Jemand ist damit vielleicht nicht einverstanden. Das ist egal! Zumindest hast du versucht so zu sein, wie du dich magst. Das ist das Mindeste, was du tun kannst. Vielleicht erfüllst du die Erwartungen anderer nicht. Wir wissen nicht, was andere für Wertvorstellungen haben. Aber wenigstens musst du so werden, wie du dich magst. - Sadhguru
Media
- Ernest & Celestine Great french series for kids (kika.de german)
- Marco polo great series about adventures and personalities of inventors
- Bluey Great calm series for kids
Learning
I love to learn something new…
Sources:
- Some new speaking languages duolingo
- Quick short syntax check learnxinminutes
- Keyboard typing Keybr
- TypingClub typingclub
- Shortcuts shortcutfoo
- TypeRacer typeracer
Coding
Doing different coding challenges:
Some of my solutions: Github/CodeChallanges
Speaking languages
- learn german as russian learngerman.dw.com
- japanese tofugu
Spaced repetition
Writing good prompts forces one to circle around a concept, look at it from multiple angles, probe its properties, link it to other concepts through similarities and differences, reason about consequences and significance, derive parts of it from more fundamental pieces, and come up with a few concrete examples of it. These are the things that really build understanding.
Source: two-wrongs
Cycling
Cool bikes
Cargo bikes
Hiking
Munsterland
Basketball
I love playing basketball and doing it in a local team twice a week. Here are some notes about my favorite sport.
Defense
A good article about defense position and play moves.
Health
Vitamins
- https://www.lavita.com Great juice for the daily vitamin balance
- Vitamin D should be taken orally as an oil and in combination with calcium and vitamin K2.
ePA
- besser der Nutzung widersprechen, nach der Aussage von Herr Lauterbach bei der Digital Health Conference des Bitkom heise
- die Zugriffe auf diese Daten wird bis 2030 nicht protokolliert mdr
Drug dealer vs. doctor
If your doctor prescribes you medication without first asking about …
- your diet
- your sleep
- your exercise routine
- your water consumption
- whether you have any structural issues
- the stress in your life Then you don’t have a doctor, you have a drug dealer.
Best summary of good food practice
-
Die ganze Farbpalette Gemüse, Salate, Kräuter und Früchte sind wertvolle Lieferanten für Mikronährstoffe und sekundäre Pflanzenstoffe, wovon Ihr Stoffwechsel, Immunsystem und Energielevel profitieren. Essen Sie so bunt wie möglich: Die Farben von Gemüse und Obst stehen für verschiedene Nährstoffe und wertvolle sekundäre Pflanzenstoffe. Stellen Sie sich einen bunten Mix zusammen, um von deren Gesundheitsvorteilen zu profitieren. Wenn Sie zu saisonalen Sorten greifen, essen Sie automatisch abwechslungsreich.
-
Kurze Wege Lebensmittel aus der Region liefern Ihnen mehr Vitamine und sekundäre Pflanzenstoffe als gespritzte Gewächshausware aus dem Süden – und sie sind besser für die Umwelt. Es gibt viele Arten, sich gesund zu ernähren. Dass es dabei vorrangig auf die Qualität der Lebensmittel ankommt, beweisen die ältesten Menschen der Welt, die sich hauptsächlich von unverarbeiteten Lebensmitteln ernähren, die in ihrer Region wachsen und gedeihen. Der Weg zum Bauern in der Nähe lohnt sich: Alte Obstsorten aus der Region sind oft verträglicher für Allergiker. Gerade bei tierischen Produkten kommt es auf Qualität und Herkunft an. Je besser die Tiere ernährt und gehalten werden, desto mehr gesunde Nährstoffe stecken in Fleisch, Eiern und Milchprodukten.
-
Überwiegend pflanzlich Hochwertige, pflanzliche Lebensmittel wie Gemüse, Obst, Kräuter, Nüsse und heimische Vollkorngetreide liefern uns viele Nährstoffe pro Kalorie. Forschungsergebnisse zeigen, dass eine gute Versorgung mit Mikronährstoffen ein entscheidender Faktor bei der Prävention ist.1,2 Pflanzliche Lebensmittel sind zudem unsere einzige Quelle für darmgesunde Ballaststoffe. Es reicht, wenn Sie den Fokus Ihrer Ernährung auf pflanzliche Lebensmittel legen. Sie müssen sich nicht ausschließlich pflanzlich ernähren, um gesund zu essen.
-
Dem Darm eine Pause gönnen Unser Darm beeinflusst unsere Gesundheit in vielen Bereichen. Er beeinflusst, wie gut wir Nährstoffe aufnehmen, er ist Teil unseres Immunsystems und er ist auch ein wichtiger Hormonproduzent. Mit einer vorwiegend pflanzlichen, ballaststoffreichen Ernährung halten Sie das Mikrobiom und Ihren Darm gesund. Um sich zu regenerieren, benötigt unser Darm Pausen. Empfehlenswert sind dreistündige Esspausen zwischen den Mahlzeiten, aber auch Intervallfasten oder Fasten allgemein unterstützt die Regeneration des Darms. Die 100-Jährigen in Japan essen nach dem Prinzip „Hara hachi bu“. Dahinter verbirgt sich die darmgesunde Regel, nur so viel zu essen, bis der Magen zu 80 Prozent gefüllt ist. Lassen Sie Lebensmittel weg, die Sie schlecht vertragen.
-
Ganze Lebensmittel Ein ganzes Dinkelkorn löst in unserem Körper eine völlig andere Reaktion aus als ein helles Weißmehlbrötchen. Auch eine frische Beere wirkt anders als das gezuckerte Erdbeerpüree im Fruchtjoghurt, ein Stück Fleisch anders als eine Scheibe Mortadella und frisches Olivenöl anders als gehärtete Industriefette. Je naturbelassener unsere Lebensmittel sind, umso wertvoller und nährstoffreicher sind sie für uns. Egal welche Ernährungsform Sie bevorzugen: Die Menge an ganzen, unverarbeiteten Lebensmitteln ist ein gutes Maß, um verschiedene Ernährungsweisen zu beurteilen.
-
Täglich LaVita als Basis LaVita unterstützt uns täglich mit allen wichtigen Vitaminen und Spurenelementen, gerade dann, wenn unsere Ernährung nicht immer optimal ist oder ein erhöhter Bedarf durch Stress oder Medikamente besteht. Viele Ernährungsexperten wie Prof. Walter Willett von der Harvard University raten im Hinblick auf unsere Ernährungsgewohnheiten zusätzlich zu einer täglichen Mikronährstoffergänzung.
-
Trinken bevor der Durst kommt Der Mensch besteht zu 80 Prozent aus Wasser. Nichts ist wichtiger für uns. Wasser ist ein entscheidendes Transportmittel, das Nährstoffe zu unseren Zellen transportiert. Moderate Mengen Kaffee oder koffeinhaltigen Tee können Sie zur Flüssigkeitszufuhr dazuzählen. Viele machen sich um Ihre Wasserzufuhr wenig Gedanken. Mit wie viel Wasser am Tag fühlen Sie sich wohl? 1,5 bis 2 Liter pro Tag sind ein guter Richtwert.
Source: LaVita Newsletter Jun 2024
Daily goals for a healthy feeling
Gesunde Ernährung im Alltag – Top-Tipps
- Starten Sie mit drei festen Mahlzeiten pro Tag – mit Pausen von jeweils 4 Stunden.
- Essen Sie zu einer Mahlzeit Obst (z. B. Frühstück) und zu den anderen beiden Mahlzeiten Gemüse.
- Freunden Sie sich mit Hülsenfrüchten an: Essen Sie mehrmals pro Woche eine Handvoll.
- Täglich eine Handvoll Nüsse – im Müsli, im Salat oder als Topping.
- Optimieren Sie Ihre Mikronährstoffzufuhr, wenn Sie es nicht immer schaffen, ausgewogen zu essen oder wenn Sie durch Belastungen oder Medikamenteneinnahme einen erhöhten Bedarf haben.
Psychisch
- Führen Sie eine Morgenroutine ein: Diese Zeit am Morgen gilt allein Ihren Interessen und Bedürfnissen.
- Tragen Sie Ihre Hobbys fest in den Terminkalender mit ein.
- Belohnen Sie sich für gemeisterte, schwierige Aufgaben und gönnen Sie sich aktiv Pausen.
- Fördern Sie positive soziale Kontakte: Verbringen Sie wöchentlich Zeit mit Personen, die Ihnen Energie schenken und Sie inspirieren.
- Achten Sie auch hier auf eine gesunde Ernährung und gute Mikronährstoffzufuhr: Biotin, Jod, Kupfer, Magnesium, Vitamin C und viele B-Vitamine tragen zu einer normalen Funktion des Nervensystems bei und die B-Vitamine unterstützen auch die normale psychische Funktion.
Source: LaVita Newsletter Jun 2024
Recommendation for healthy heart
Lebensmittel | Menge | Sorten | Zu Vermeiden |
---|---|---|---|
Obst | 3–5 Portionen pro Tag | Alle zuckerarmen Obstsorten wie Beeren, Clementinen, Grapefruit, Kiwi, Nektarine | Gezuckerte Obstkonserven und Obstmus, kandierte Früchte |
Nur in Maßen zuckerreiche Sorten: Ananas, Banane, Birne, Honigmelone, Mango | |||
Gemüse | Mind. 4 Portionen pro Tag | Fast alle Gemüsesorten, insb. Feldsalat, Grünkohl, Knoblauch, Spinat, Rote Bete | Mais, Gemüsekonserven (salzreich) |
Hülsenfrüchte | Mehrmals pro Woche, mind. 300 Gramm | Alle Sorten, egal ob getrocknet, aus der Dose oder Tiefkühlware | Gezuckerte Hülsenfrüchte |
Brot, Getreide & Beilagen | 4 Portionen pro Tag | Vollkornbrot und -brötchen, Haferflocken, Müsli ohne Zucker, Vollkornnudeln | Weiß- und Toastbrot, Zwieback, Weizenbrötchen, Pommes |
Nüsse & Samen | 30–40 g pro Tag | Naturbelassene Mandeln, Walnüsse, Cashewnüsse, Kürbiskerne, Lein- und Chia-Samen | Gesalzene Nüsse, gebrannte Mandeln |
Fette & Öle | 2 EL pro Tag | Olivenöl, Rapsöl, Walnussöl, Hanföl, Leinöl | Schweine- und Gänseschmalz, Palmfett, Sonnenblumenöl |
Fisch & Meeresfrüchte | 2 Portionen pro Woche | Fisch (frisch oder TK); insbesondere wie Lachs, Makrele, Hering | Fisch in Mayonnaise oder Sahne eingelegt |
Eier | Mehrmals pro Woche | ||
Milch & Milchprodukte | 250 g pro Tag | Milch (1,5 % Fett), Buttermilch, Speisequark, Naturjoghurt, Kefir | Mayonnaise, Sahne, Schmand, gesüßte Fertigprodukte |
Käse | 2 Scheiben (50–60 g) pro Tag | Käse bis 45 % Fett i. Tr.: Harzer Käse, körniger Frischkäse, Schnittkäse | |
Fleisch & Wurstwaren | Max. 1–2 kleine Portionen pro Woche | Mageres Fleisch wie Putenbrust, Hühnerfleisch | Rotes Fleisch, Schweinefleisch, alle Wurstwaren |
Snacks & Süßigkeiten | Selten, maximal 1 kleine Handvoll pro Tag | Mind. 70%ige Zartbitterschokolade, Obst, Haferkekse | Süßigkeiten, süße Backwaren, süße Milchprodukte, Chips |
Getränke | 1,5–2 Liter pro Tag | Wasser, ungezuckerter Kräutertee | Milchmixgetränke, Alkohol, Fruchtsaft, Softdrinks |
Source: LaVita Newsletter August 2024
Documents
I prefer to scan my entire post incoming via iphone Readdle - Scanner Pro to my cloud and organize my personal document collection in following structure:
-
Arbeit und Beruf Zeugnisse, Studienunterlagen, Diplome, Arbeits- und Ausbildungsverträge, Fortbildungsmaßnahmen, Arbeitsverträge, Lohn- und Gehaltsabrechnungen, Beurteilungen
-
Fahrzeuge Fahrzeugpapiere, Unterlagen Kfz-Steuer, Rechnungen Reparatur, Belege zu Unfällen, Mitgliedschaften Automobilclub, TÜV- und ASU-Belege
-
Finanzen und Steuern Steuererklärungen, Steuerbescheide, Kontoeröffnungen, Kontoauszüge, Freistellungsaufträge, Vermögenswirksame Leistungen, Kreditverträge, Aktien, Geldanlagen
-
Gesundheit Krankenversicherung, Schreiben Krankenkasse, Impf- oder Mutterpass, Auslandskrankenversicherung, Pflegeversicherung, Rechnungen zu Behandlungen, Ärztliche Gutachten
-
Persönliche Dokumente Heirats- und Geburtsurkunden, Familienstammbuch, Reisepass, Meldebestätigungen, Lebenslauf, Testament, Patientenverfügung, Vorsorgevollmacht, Meldungen zur Sozialversicherung
-
Versicherungen Versicherungsverträge jeder Art, Versicherungsnachträge, Unterlagen zur privaten und gesetzlichen Rentenversicherung
-
Wohnen oder Immobilien Mietverträge, Belege für Kaution, Nebenkostenabrechnungen, Verträge mit Versorgungsträgern (Strom, Gas, Wasser) und Telefonanbietern, Rundfunkbeiträge, Kaufbelege Wohnungseinrichtung und Elektrogeräte, Notarielle Verträge und Urkunden zum Eigenheim bzw. zur Eigentumswohnung, Grundbuchauszug, Rechnungen zu Reparaturen und Modernisierung
-
Kinder Für jedes Kind wird ein Ordner mit folgenden Dokumenten angelegt: Geburtsurkunde, Impfausweis, Zeugnisse, Ausbildungsnachweise, Hobby, Mitgliedschaften in Vereinen
-
Hobby, Freizeit und Sport Verträge zu Mitgliedschaften im Fitnessstudios oder Vereinen, Kaufbelege für Sportgeräte oder –Ausrüstung
Script for create folder structure in terminal...
mkdir -p "Arbeit und Beruf/Zeugnisse"
mkdir -p "Arbeit und Beruf/Studienunterlagen"
mkdir -p "Arbeit und Beruf/Diplome"
mkdir -p "Arbeit und Beruf/Arbeits- und Ausbildungsverträge"
mkdir -p "Arbeit und Beruf/Fortbildungsmaßnahmen"
mkdir -p "Arbeit und Beruf/Arbeitsverträge"
mkdir -p "Arbeit und Beruf/Lohn- und Gehaltsabrechnungen"
mkdir -p "Arbeit und Beruf/Beurteilungen"
mkdir -p "Fahrzeuge/Fahrzeugpapiere"
mkdir -p "Fahrzeuge/Unterlagen Kfz-Steuer"
mkdir -p "Fahrzeuge/Rechnungen Reparatur"
mkdir -p "Fahrzeuge/Belege zu Unfällen"
mkdir -p "Fahrzeuge/Mitgliedschaften Automobilclub"
mkdir -p "Fahrzeuge/TÜV- und ASU-Belege"
mkdir -p "Finanzen und Steuern/Steuererklärungen"
mkdir -p "Finanzen und Steuern/Steuerbescheide"
mkdir -p "Finanzen und Steuern/Kontoeröffnungen"
mkdir -p "Finanzen und Steuern/Kontoauszüge"
mkdir -p "Finanzen und Steuern/Freistellungsaufträge"
mkdir -p "Finanzen und Steuern/Vermögenswirksame Leistungen"
mkdir -p "Finanzen und Steuern/Kreditverträge"
mkdir -p "Finanzen und Steuern/Aktien"
mkdir -p "Finanzen und Steuern/Geldanlagen"
mkdir -p "Gesundheit/Krankenversicherung"
mkdir -p "Gesundheit/Schreiben Krankenkasse"
mkdir -p "Gesundheit/Impf- oder Mutterpass"
mkdir -p "Gesundheit/Auslandskrankenversicherung"
mkdir -p "Gesundheit/Pflegeversicherung"
mkdir -p "Gesundheit/Rechnungen zu Behandlungen"
mkdir -p "Gesundheit/Ärztliche Gutachten"
mkdir -p "Persönliche Dokumente/Heirats- und Geburtsurkunden"
mkdir -p "Persönliche Dokumente/Familienstammbuch"
mkdir -p "Persönliche Dokumente/Reisepass"
mkdir -p "Persönliche Dokumente/Meldebestätigungen"
mkdir -p "Persönliche Dokumente/Lebenslauf"
mkdir -p "Persönliche Dokumente/Testament"
mkdir -p "Persönliche Dokumente/Patientenverfügung"
mkdir -p "Persönliche Dokumente/Vorsorgevollmacht"
mkdir -p "Persönliche Dokumente/Meldungen zur Sozialversicherung"
mkdir -p "Versicherungen/Versicherungsverträge"
mkdir -p "Versicherungen/Versicherungsnachträge"
mkdir -p "Versicherungen/Unterlagen Rentenversicherung"
mkdir -p "Wohnen oder Immobilien/Mietverträge"
mkdir -p "Wohnen oder Immobilien/Belege für Kaution"
mkdir -p "Wohnen oder Immobilien/Nebenkostenabrechnungen"
mkdir -p "Wohnen oder Immobilien/Verträge mit Versorgungsträgern und Telefonanbietern"
mkdir -p "Wohnen oder Immobilien/Rundfunkbeiträge"
mkdir -p "Wohnen oder Immobilien/Kaufbelege Wohnungseinrichtung und Elektrogeräte"
mkdir -p "Wohnen oder Immobilien/Notarielle Verträge und Urkunden"
mkdir -p "Wohnen oder Immobilien/Grundbuchauszug"
mkdir -p "Wohnen oder Immobilien/Rechnungen"
mkdir -p "Kinder/Geburtsurkunde"
mkdir -p "Kinder/Impfausweis"
mkdir -p "Kinder/Zeugnisse"
mkdir -p "Kinder/Ausbildungsnachweise"
mkdir -p "Kinder/Hobby"
mkdir -p "Kinder/Vereine"
mkdir -p "Hobby, Freizeit und Sport/Verträge"
mkdir -p "Hobby, Freizeit und Sport/Kaufbelege"
Source: sos-buerodienste
Misc
@misc
Avatar
Avatar maker
https://getavataaars.com/?accessoriesType=Blank&clotheColor=Gray01&clotheType=ShirtCrewNeck&eyeType=Default&eyebrowType=Default&facialHairColor=BrownDark&facialHairType=BeardLight&hairColor=BrownDark&mouthType=Serious&skinColor=Brown&topType=ShortHairShortFlat
Austria
Wien
- Cafe Sperl - Kapuziner/Melonch
Columbia
- Vanadurgo Ashram (San Rafael)
France
Provence
- Château Margüi - Châteauvert
- Sainte Maxime - great village at cote dAzur
Corsica
- ferry from nice (take a room, pay for it!)
- in summer its to hot, go in april or late september
- stay in north of island
- napoleon resort
Germany
Münster
- Marktplatz am Dom
Berlin
- Secret garden - vegan sushi
- Frea - vegan. Zero waste.
- Kopps - weltbest vegan
- Mana - vegan
- Lucky leek - vegan
- Sudho 2 indish
- India Club - indisch
- Mis Kebap Kottbusser Tor
Düsseldorf
- Vabali - Wellnes & Spa
- in the japanese quarter, eat in “Eat Tokyo”
- Gusan
- Takumi Tonkotsu -Takumi Nidaime- Ramen
- Takumi 6th Spicy Tan Tan Men
- Jenka - russian kitchen
Hamburg
- Azeitona - vegetarische arabische Küche
- Boname - türkische Küche
- Pamukkale Grill & Restaurant
- BATU Noodle Society
Fürth
- Naples by Matteo (Napolitan Pizza)
Füssen
- Lechfall
- Baumkronenpfad
- Tegelbergbahn/Rohrkopfhütte
- Sommerrodelbahn/Kneippfad
- Schloss Schwanstein/Hohen Schwangau
- Schwansee
Great britian
London
- Darjeeling Express (indisch)
Greek
Crete
Places of interest:
- San torini: visit the most beautiful island in the world!
- Heraklion (capital): beautiful old town with a port
- Chania: old town with venetian port
- Matala: great old town with cool flair
- Beautiful beaches: visit minimum one of the beautiful beaches
Here are the most beautiful places in Japan that you must visit - a thread🧵👇
2. Ikoma, Japan 🇯🇵
Ikoma, a city in Nara Prefecture, Japan, is known for Mount Ikoma, Amusement Park, and beautiful night views over Osaka.
3. Mount Fuji, Japan 🇯🇵
Rising from Japan’s heart, Fuji’s snow-kissed cone, a timeless icon.
4. Miyazaki, Japan 🇯🇵
Sun-drenched shores and misty mountains, Miyazaki whispers legends old.
5. Tokyo, Japan 🇯🇵
Tokyo, Japan’s bustling capital, is a blend of traditional and modern, with historic temples, skyscrapers, and a vibrant cultural scene.
6. Osaka, Japan 🇯🇵
Osaka is Japan’s third-largest city, renowned for its vibrant nightlife, culinary delights, friendly locals, and rich commercial history.
7. Hokkaido, Japan 🇯🇵
Hokkaido, Japan’s northernmost island, is known for its vast wilderness, ski resorts, hot springs, and the annual Sapporo Snow Festival.
8. Onomichi, Japan 🇯🇵
9. Yamagata, Japan 🇯🇵
Yamagata, in Tohoku region, is celebrated for its sports, “snow monsters,” historic temples, hot springs, and fruit farms.
10. Eshima Ohashi Bridge, Matsue, Japan 🇯🇵
11. Nachi Falls in Nachikatsuura, Japan 🇯🇵
12. Konan, Aichi, Japan 🇯🇵
13. Namahage Statue, Oga, Japan 🇯🇵
14. Kamishikimi Kumanoza Shrine, Takamori, Japan 🇯🇵
15. Narai-juku, Nagano, Japan 🇯🇵
16. Sendai Daikannon, Sendai, Japan 🇯🇵
18. Mifuneyama Rakuen Park, Takeo, Japan 🇯🇵
19. Naoshima, Japan’s island of art 🇯🇵
21. Itsukushima Shrine, Hatsukaichi, Japan 🇯🇵
22. Hitachi Seaside Park, Japan 🇯🇵
23. Mihonoseki Blue Cobblestone Street, Japan 🇯🇵
25. Matsumoto Castle, Japan 🇯🇵
30. Kawagoe, Japan 🇯🇵 Source • • •
Israel
Tel Aviv
- Abu hasan - humus
Tuscany
- San Gimignano, Gelateria Dondoli (Safran ice cream)
- Molino del prato in Volterra https://www.booking.com/Share-4zmW24
- Volterra - great small old village
- Vinci - village birthplace of da vinci
Best Places in Sardinia:
- La Maddalena Archipelago: A hidden gem with stunning beaches and clear waters, perfect for snorkeling and diving.
- Bosa: A picturesque town known for its colorful houses, medieval castle, and riverside setting.
- Gola su Gorropu: Europe’s deepest gorge, offering spectacular hiking opportunities amid dramatic limestone cliffs.
- Isola dell’Asinara: A national park with pristine beaches and wild landscapes, once home to a high-security prison.
- Orgosolo: Famous for its murals depicting social and political themes, providing insight into Sardinian culture and history.
Secrets:
- Su Nuraxi di Barumini: While not exactly a secret, this UNESCO-listed nuragic complex is often overlooked by tourists but offers a fascinating glimpse into Sardinia’s ancient past.
- Nuraghe Santu Antine: Another impressive nuraghe site, often less crowded than Su Nuraxi but equally captivating.
- Tiscali: A hidden archaeological site accessible via a scenic hike, featuring a well-preserved nuragic village inside a limestone cave.
- Spiaggia del Principe: Although it’s gaining popularity, this stunning beach on the Costa Smeralda still feels relatively secluded compared to other nearby beaches.
- Monte Arci: A volcanic massif dotted with ancient mines and archaeological sites, offering excellent hiking opportunities and panoramic views.
Tips:
- Rent a Car: While public transportation is available, renting a car allows you to explore remote areas and hidden gems at your own pace.
- Visit in the Shoulder Seasons: Avoid the peak summer months if possible (July and August) to experience fewer crowds and more comfortable temperatures.
- Try Local Cuisine: Don’t miss the opportunity to sample traditional Sardinian dishes like pane carasau (crispy flatbread), malloreddus (Sardinian gnocchi), and seadas (cheese-filled pastries).
Locations
- Sassi Piatti
- La Pelosa
- Sella Del Diavolo
- Piscine di Molara con @oltremareescursioni
- Laveria La Marmora
- Capriccioli
- Cala Luna
- Porto Giunco
Bed & breakfast
- Re: Fernweh nach Italien: Anders reisen nach der Pandemie -> Suzanne Simons and Fabio Firli
- borgolacasaccia
Kroatia
Krk
Marokko
Marrakesch
- Teppich laden nr 142 mr blauvier Beni Ourain Teppich aus Schafwolle Rautenmuster 1,45 x 2,15
- Restaurant le jardin tasjine und pastata essen Shop über dem Restaurant Norya Ayron qaftan kimono -souks Markt bazar -33 rue majorelle Tresor des nomades
- Ben jussuf
- Café de France -bazar Altstadt Medina
- rue Yves Saint Laurent - rue majorelle
- bahia Palast*
- Djemaa El Fna (: N°98 Mustafa / mix Teller)
- Restaurant “Fundouk” (Unbedingt probieren: Hühnchen mit kandierten Zitronen und Oliven.)
- Hamam – Place des Épices Spa
- Bain Bleu und Le Bains de marrakesch
- arganöl https://www.google.de/amp/s/www.cntraveler.com/galleries/2015-01-06/shopping-in-morocco-dont-leave-without-these-souvenirs-tapestries-argan-oil/amp
- Wasserfälle ouzoud
- La Crêperie de Marrakesch
- maison de la photographie
- Agadir -amlou -taj palace -la mamounia Kamel reiten Beduinen Zelt
- Quadtour in der Wüste La Palmeraie*
Netherland
Special characteristics
- very rare rest places on highways
- the kids have no headgear on very cold days in winter
- no bakeries for breakfasts outside of city centrum (book breakfast in hotel or buy something in the evening for the next morning)
Places
- Drouwenerzand Park - Nice park for kids with all-you-can-eat
- Giethorn - Is called the dutch venice
- Camping in castricum (Gemüsehaus) Geversduin
- Texel Bundgalow 165
- legendary beer Trappist Westvleteren
- warbeek All-inclusive Freizeitpark
- Pony city
Amersfoort
- Bastion Hotel ⭐️⭐️⭐️⭐️ Not that expansive hotel (new building)
- Zoo Dierenpark ⭐️⭐️⭐️⭐️ Exotic animals with great activities for kids with a huge dino park
- Playground Randenbroek, great park
- La base pizza (italian pizza)
Utrecht
- Rent a bike at William street bike BV
- Ride a tour till the botanical garden over the favorite rainbow path
- take a city boat tour
- climb the dom and enjoy the pubs around
- Ramen brothers utrecht (delicious!)
Texel
Take a winter jacket including hood outside the summer months.
Some point-of-interests for kids:
- Del Mare Natuureiland - Great place to be and chill to inspect on several birds
- Manege Elzenhof ⭐️⭐️⭐️⭐️⭐️
- Texel Sheep Farm Schapenboerderij ⭐️⭐️⭐️⭐️⭐️
- Ferienpark De Krim swim/kidsplaces ⭐️⭐️⭐️⭐️
- Eisbauer “Eisdiele” Labora ⭐️⭐️⭐️
- Leuchtturm Vuurtoren ⭐️⭐️⭐️⭐️
- Sommeltjespad ⭐️⭐️⭐️⭐️
- Ecomare ⭐️⭐️⭐️
- Isola Bella - very good italian restaurant
Harleem
- I Fratelli italian
Amsterdam
- Nemo - science museum experiments for kids
- Dun Yong Ramen (shop) tasty ramen (4th floor)
Recommendations from Amanda Perino
Practical tips
- Earplugs are always a good idea, no matter where you are staying. Amsterdam is an old city, and very compact. This means insulation is often poor, and the streets are loud.
- Don’t walk in the bike lane. For the love of all that is holy, do not walk on or cross the bike lanes without looking at least two or three times, both ways.
- If you rent a bike, treat the bike bell like a car horn, not like a fun toy. Use only when needed.
- Tipping in Amsterdam is becoming more popular, but is not required. It is customary to round a bill up if you do want to leave a tip. For instance, if your bill for food and drink comes to 65 euro, you might leave 70 euro. It is not usual to tip on just a drink order at a bar.
Eat
Booking ahead is always recommended!
Casual/mid-range:
- The Lobby Nesplein- nice for lunch or dinner. Cozy, intimate, and classy. Close to Dam Square and the Rails World venue.
- Vessel- set in a beautiful hotel (Boat & Co) overlooking the harbor in the West. Note from Amanda: I go here to co-work pretty often, just because I like the space.
- Wilde Zwijnen- cozy, chef’s menu, seasonal
- Foodhallen- Very popular hipster food hall, but lots of variety at the many stalls. But good luck finding a table! (and keeping it). (No need to book ahead here.)
- Maydanoz turkish restaurant
When you want to spend a little more on the experience:
- Choux- Amanda’s personal favorite. They put a lot of care into their dishes and it shows. Heavy on the fish/seafood/vegetables.
- Wolf Atelier - when you’re thinking ‘I could really go for 15 courses right about now…’
For those who brunch:
- Cut Throat- because you can get brunch and a haircut at the same time (but I just love the space itself).
- Dignita- There are 3 in the city, so take your pick.
Drink: coffee
Amsterdam looooooooves coffee so there are a ton of great coffee places in the city, and you never have to go far to find the good stuff. Here are a few options depending on where you are in the city.
- Lot 61- near the Kinkerstraat
- Back to Black- near the Leidseplein/Rijsmuseum
- Toki- near the Haarlemmerstraat
- Hummingbird- near the Spui/Dam/Rokin
- Monk’s- near De Clerqstraat
Drink: alcohol
If you like natural wines and slightly more intimate vibes:
If you don’t mind a (younger) crowd and ordering at the bar:
If you like beer:
- Brouwerij t’Ij- local brewery with tasting room right under a windmill. Can’t get more Dutch than that.
- Gollem- there are a couple in the city, and all have a massive selection of beers from the NL and Belgium and further abroad.
Proeflokaal:
- Try genever at one of the fun old proeflokalen in the city. Wynand Fockink is by Dam Square and can be crowded and touristy, but also very fun.
Bruin cafes:
- Dutch brown bars are small, cozy, fun, and historic. Grab a vaasje (small beer), kaasblokjes (cheese blocks), and get a feel for what ‘gezellig’ truly means. Het Papeneiland, Cafe ‘t Smalle, Cafe Chris, and De Sluyswacht, to name a few.
- If you like cocktails: Note from Amanda: I am not a fan of cocktails, but if you are going to go, these are the best spots.
- Hiding in Plain Site
- Tales & Spirits
- Rosalie’s Menagerie
See/Do
- Noordermarkt (market) - a fun Saturday market in the Jordaan to browse food, antiques, and people. From 9am to 3pm.
- Boating on the canals- Amsterdam by water is the very best. Three options:
-
- Big boat tours. They leave from Central Station, but are impersonal and touristy.
-
- If you don’t want to drive or want more people onboard and are willing to pay more for someone else to drive, try: boatnow Don’t forget to invite your good pal Amanda P.
- Kuuma sauna- private sauna for you and friends, with a fun view overlooking the old ship in Marrineterrein. (Amsterdam location should be available to book again in October.) Tip: No hot showers on site, so plan to head to your hotel after before going elsewhere.
- Mooie Boules- whether you call it petanque or boules, this is a fun bar with boules fields inside. Best to book your field ahead.
- TonTon Club - a barcade in Westerpark with pub food, drinks, and an upstairs with lots of fun games.
- Duke of Tokyo- karaoke bar with private rooms set up like a narrow alley in Tokyo. Fun vibes. It’s popular, so booking ahead is advised.
Museums
-
Rijksmuseum- go for the masterpieces, stay for the building/architecture, and make sure to catch the detailed paintings of the ships at sea mid-battle (Amanda’s personal favorite).
-
Het Scheepsvaartmuseum & VOC Schip Amsterdam- Note from Amanda: The National Maritime Museum probably isn’t high on many people’s lists, but with the architecture of the building itself, the amazing collection of ship battle scenes, and the reproduction of the wooden ship outside, it hits all the right notes for me (nerd alert!). I think it’s pretty cool and very Dutch.
-
Straat- street art museum in a huge old warehouse.
Portugal
- taste portugisian cafe “Sical 5 Estrelas”
Spain
Mallorca
- Xoriguer Mahon Gin
- Finca es Rafal, Agroturisme
- Cala Murada - Marcel Wüst Rennrad Urlaub
- Bucht Caló des Moro
- Santanyi
Tenerife
- Lago Martiánez - Puerto de la Cruz
Gran canaria
- Amadores Beach Club
Art
Favorite artists:
Jean-Michel Basquiat
Pablo Picasso
Leon Löwentraut
Ivan Aivazovsky
Heinz Henschel
https://www.verlag-david.de
3 Mäuse
Drei Mäuse sitzen an der Bar und protzen damit, wer von ihnen die coolste ist. Die Erste sagt: “Wenn ich eine Mausefalle sehe, nehme ich mit der linken Hand den Käse raus. Mit der rechten fange ich den Bügel ab und mache vor dem Essen noch etwas Krafttraining”. Die Zweite: “Wenn bei uns Rattengift gestreut wird, nehme ich mir eine Rasierklinge, hacke den Stoff klein, lege eine Linie und zieh mir das Zeug durch die Nase.” Die dritte Maus steht auf und geht. “Hat’s Dir die Sprache verschlagen?” fragen die Mäuse. “Ihr langweilt mich”, sagt die Dritte. “Ich geh nach Hause, die Katze ficken.”
Uwe
Ein Mann kommt in ein kleines Lokal und fragt: “Habt ihr hier auch Nutten?” Sagt der Wirt: “Nee, wir haben nur unseren Uwe.” Guckt der Mann etwas verwirrt und meint dann: “Egal, ich bin so geil, ich brauche jetzt unbedingt Sex. Was kostet das denn?” “80€”, sagt daraufhin der Wirt. “OK. Und wie läuft das dann ab? Ich geb dem uwe die 80 € und dann wird gebumst?” “Nein, nicht ganz”, sagt der Wirt. “40 € bekommt unser Bürgermeister. Es ist sein Dorf und er hat es eigentlich nicht so gerne. So ist er beruhigt und sagt auch nix.” “OK, egal. Dann bekommt der Uwe eben 40€.” “Auch nicht”, sagt der Wirt. 20 € bekomme ich. Das hier ist mein Gasthaus und ich hab das auch nicht so gerne.“ “Soll mir auch recht sein”, sagt der Mann. “Bekommt der Uwe eben nur 20€.” “Auch falsch,” sagt der Wirt. “Die letzten 20€ teilen sich Michael und Rainer. Die halten Uwe fest. Der hat das nämlich auch nicht so gerne.”
New words (german)
Here I note all the unknown words, that I found while reading.
Amme
Askese - grichische Büste
Denunziation - Androhung/ öffentliche Beschuldigung
Desjatine
Dezennien
Diabas
Dossier - Sammlung von Dokumenten zu einem Thema
Dschunke - ein oder mehrmstiger Segelschiff
Elliptisch
Eloxiert - Oberflächentechnik einer oxidischen Schutzschicht
Entgraten -
Epauletten - Schulterstück einer Uniform
Equipagen
Ethnographisch -
Fehdehandschuh - Streit beginnen/annehmen
Flakon - Glasgefäss
Gestuet
Goutiert - Gefallen haben/ jemand,etwas schätzen
Hermaphrodit - Zwitter
Jovial - wohlwollendes herablassendes Verhalten
Kalesche
Kiepe
Kimono - jap. Kleidungsstück
Konvolut - lat. zusammengerollt, Verwachsung
Leuzismus
Livree - Uniform der Dienerschaft
Nomenklatur - Namesverzeichnis/Sammlung von Benennungen
Nuancen - feine Optimierung
Pein
Pekuniär - Geld Finanzielle Basis
Pelonken
Percheron - Kaltblut Pferderasse
Permutation - Anordnung von Objekten
Praeludium - Eröffnungsinstrumental = Prä
Präses - leitende Person kirchlicher Gremien
Sublimiert - durch Veredelung auf eine höhere Stufe gebracht
Synode - Kirhcenmitglider
Teint
Trunk
Tuell
Ireland
A poem on our journey in ireland, the bus driver bud wishes a poem from her adventurers.
living in the wild like a sheep alongside are the cliffs so deep Sitting in the bus listening to Bud’s stories Makes you feel like there are no worries And all you want is this to keep.
All those greyish stones around Standing together on the ground Walls builded by the people In the back a steeple And the wind makes a sad sound.
To the cliffs from east to the west the guide bud does all the best tells us lots of funny stories creates for us some new memories One thing learned again: never rest
Der Panther
Im Jardin des Plantes, Paris
Sein Blick ist vom Vorübergehn der Stäbe so müd geworden, dass er nichts mehr hält. Ihm ist, als ob es tausend Stäbe gäbe und hinter tausend Stäben keine Welt.
Der weiche Gang geschmeidig starker Schritte, der sich im allerkleinsten Kreise dreht, ist wie ein Tanz von Kraft um eine Mitte, in der betäubt ein großer Wille steht.
Nur manchmal schiebt der Vorhang der Pupille sich lautlos auf -. Dann geht ein Bild hinein, geht durch der Glieder angespannte Stille - und hört im Herzen auf zu sein.
Rainer Maria Rilke, 6.11.1902, Paris
Survival
Collection of information to survive in a blackout or in the wild for some time.
- Cooking water with only one wire and 2 razor blades
- Recommendation of german disaster control checklists
Quotes
Sadhguru
Elternschaft ist schon eine lustige Sache. Du versuchst etwas zu tun, von dem niemand jemals wusste, wie man es richtig macht. Aber du willst dein Bestes geben! Also was kannst du am besten tun? Das Erste ist, ein wenig an sich selbst zu arbeiten. Verbringe genügend Zeit mit dir selbst. Schau dich genau an: Wie du bist, wie du sitzt, wie du stehst, wie du sprichst, was du machst, was du nicht machst. Ich denke, man muss sich selbst sehr genau betrachten. Denn die Kinder erfassen alles schnell und sie werden das, was du tust, verstärken. Eines der wichtigsten Dinge ist, sich zumindest so zu gestalten, wie man sein möchte. Jemand ist damit vielleicht nicht einverstanden. Das ist egal! Zumindest hast du versucht so zu sein, wie du dich magst. Das ist das Mindeste, was du tun kannst. Vielleicht erfüllst du die Erwartungen anderer nicht. Wir wissen nicht, was andere für Wertvorstellungen haben. Aber wenigstens musst du so werden, wie du dich magst.
Nicholas Rockefeller
Der Feminismus ist unsere Erfindung aus zwei Gründen. Vorher zahlte nur die Hälfte der Bevölkerung Steuern, jetzt fast alle weil die Frauen arbeiten gehen. Außerdem wurde damit die Familie zerstört und wir haben dadurch die Macht über die Kinder erhalten. Sie sind unter unserer Kontrolle mit unseren Medien und bekommen unsere Botschaft eingetrichtert, stehen nicht mehr unter dem Einfluss der intakten Familie. In dem wir die Frauen gegen die Männer aufhetzen und die Partnerschaft und die Gemeinschaft der Familie zerstören, haben wir eine kaputte Gesellschaft aus Egoisten geschaffen, die arbeiten (für die angebliche Karriere), konsumieren (Mode, Schönheit, Marken), dadurch unsere Sklaven sind und es dann auch noch gut finden.
Ralph Waldo Emerson
Das Wissen, dass mindestens eine Person dank deiner Existenz ein besseres Leben hatte. Das bedeutet Erfolg.
Steve Jobs
Die Leute, die so verrückt sind zu glauben, dass sie die Welt verändern können, sind diejenigen, die es tun.
Pablo Picasso
Others have seen what is and asked why. I have seen what could be and asked why not.
Goran Kikic(?)
Alle sagten: Das geht nicht. Dann kam einer, der wusste das nicht und hat’s gemacht.
Leo Tolstoi (Lew Nikolajewitsch Tolstoi)
Alle glücklichen Familien gleichen einander, jede unglückliche Familie ist auf ihre eigene Weise unglücklich. (1. Zeile Anna Karenina)
Es gibt Menschen, die ein Stück Land ‚Mein‘ nennen, und dieses Land nie gesehen und betreten haben. Die Menschen trachten im Leben nicht danach zu tun, was sie für gut halten, sondern danach, möglichst viele Dinge ‚Mein‘ zu nennen.
Dont know where I found it.
Werbung = Die Kunst, auf den Kopf zu zielen und die Brieftasche zu treffen
Asma Khan‘s father (Chefs table S6E3)
Use your life to make a difference, because being in a position of privilege, you have a duty. To lift others up.
Immanuel Kant
Die Freiheit des Einzelnen endet dort, wo die Freiheit des Anderen beginnt.
Savas Yurderi
Der Sinn des Leben ist, deinem Leben einen Sinn zu geben
Carl Josef »Necko« Neckermann. (1912 - 1992)
Wer nicht mit der Zeit geht, geht mit der Zeit.
Muhammad Ali
If it doesn’t challenge you, it doesn’t change you
Karl Stojka, Auschwitzüberlebender
Es waren nicht Hitler oder Himmler, die mich verschleppt, geschlagen & meine Familie erschossen haben. Es waren der Schuster, der Milchmann, der Nachbar, die eine Uniform bekamen und dann glaubten, sie seien die Herrenrasse.
Mahatma Gandhi
Die Größe und den moralischen Fortschritt einer Nation kann man daran messen, wie sie ihre Tiere behandeln.
Bertolt Brecht
Reicher Mann und armer Mann standen da und sah’n sich an. Und der arme sagte bleich, wär ich nicht arm, wärst du nicht reich.
Albert Einstein
Diejenigen, die das Privileg haben, zu wissen, haben die Pflicht zu handeln.
G. Michael Hopf
Hard times create strong men, strong men create good times, good times create weak men, and weak men create hard times
Wie man gut schreibt
- Alliterationen auslassen. Allezeit.
- Fuck Anglizismen!
- Denk Dir keine Sätze, die das Prädikat zerteilen, aus.
- Achte auf korekte Orthographie, und Interpunktion
- Meide das Klischee wie der Teufel das Weihwasser. Es ist ein alter Hut.
- Vergleiche sind schlimmer als Klischees.
- Am schlimmsten sind Superlative. Achtens: Halte Aufbau und Stil durch.
- Sei mehr oder weniger spezifisch.
- Kein Mensch mag allgemeine Behauptungen.
- Sei nicht redundant, benutze nicht mehr Wörter als nötig. Das ist nämlich total absolut überflüssig.
- Wer braucht rhetorische Fragen?
- Übertreibung ist eine Million mal schlimmer als Untertreibung.
29 ways to stay creative
Found it a long time ago and print it to a poster.
01 make Lists
02 Carry a notebook everyWhere
03 try Free Writing
04 Get aWay From the Computer
05 quit beatinG yourselF up
06 take breaks
07 sing in the shoWer
08 drink Coffe
09 Listen to neW musiC
10 be open
11 surround yourselF With Creative people
12 get feedbaCk
13 CoLLaborate
14 don`t Give up
15 praCtiCe praCtiCe praCtiCe
16 alloW yourselF to make mistakes
17 Go someWhere neW
18 Count your bLessings
19 Get lots oF rest
20 take risks
21 break the ruLes
22 don`t forCe it
23 read a paGe oF the diCtionary
24 Create a frameWork
25 stop tryinG to be someone else`s perfeCt
26 Got an idea? Write it doWn
27 CLean your WorkspaCe
28 have fun
29 Finish something
Why complicate Life
- Missing somebody - Call.
- Wanna meet up - Invite.
- Wanna be understood - Explain.
- Have questions - Ask.
- Don’t like something - Speak up.
- Like something - Share it.
- Want something - Ask for it.
- Love someone - Tell them.
You only live once. Keep it simple.
Productivity
7 productivity recommendations by @elonmusk (confirmed)
- Excessive meetings are the blight of big companies and almost always get worse over time. Please get of all large meetings, unless you’re certain they are providing value to the whole audience in which case keep them very short.
- Also get rid of frequent meetings, unless you are dealing with an extremely urgent matter. Meeting frequency should drop rapidly once the urgent matter is resolved.
- Walk out of a meeting or drop off a call as soon as it is obvious you aren’t adding value. It is not rude to leave, it is rude to make someone stay and waste their time.
- Don’t use acronyms or nonsense words for objects, software or processes at Tesla. In general, anything that requires an explanation inhibits communication. We don’t want people to have to memorize a glossary just to function at Tesla.
- Communication should travel via the shortest path necessary to get the job done, not through the “chain of command”. Any manager who attempts to enforce chain of command communication will soon find themselves working elsewhere.
- A major source of issues is poor communication between depts. The way to solve this is allow free flow of information between all levels. If, in order to get something done between depts, an individual contributor has to talk to their manager, who talks to a director who talks to a VP, who talks to another VP, who talks to a director, who talks to a manager, who talks to someone doing the actual work, then super dumb things will happen. It must be ok for people to talk directly and just make the right thing happen.
- In general, always pick common sense as your guide. If following a “company rule” is obviously ridiculous in a particular situation, such that it would make for a great Dilbert cartoon, then the rule should change.
Source: twitter@GrabrielGruber
Email from Elon
Progress, Precision and Profit
Everybody
Progress
First, congratulations are in order! We have now completed our third full week of producing over 2000 Model 3 vehicles. The first week was 2020, the second was 2070 and we just completed 2250 last week, along with 2000 Model S/X vehicles.
This is more than double Tesla’s weekly production rate last year and an amazing feat in the face of many challenges! It is extremely rare for an automotive company to grow the production rate by over 100% from one year to the next. Moreover, there has simultaneously been a significant improvement in quality and build accuracy, which is reflected in positive owner feedback.
Starting today at Giga and tomorrow at Fremont, we will be stopping for three to five days to do a comprehensive set of upgrades. This should set us up for Model 3 production of 3000 to 4000 per week next month.
Another set of upgrades starting in late May should be enough to unlock production capacity of 6000 Model 3 vehicles per week by the end of June. Please note that all areas of Tesla and our suppliers will be required to demonstrate a Model 3 capacity of ~6000/week by building 850 sets of car parts in 24 hours no later than June 30th.
Any Tesla department or supplier that is unable to do this will need to have a very good explanation why not, along with a plan for fixing the problem and present that to me directly. If anyone needs help achieving this, please let me know as soon as possible. We are going to find a way or make a way to get there.
The reason that the burst-build target rate is 6000 and not 5000 per week in June is that we cannot have a number with no margin for error across thousands of internally and externally produced parts and processes, amplified by a complex global logistics chain. Actual production will move as fast as the least lucky and least well-executed part of the entire Tesla production/supply chain system.
By having a Model 3 subsystem burst-build requirement of 6k by the end of June, we will lay the groundwork for achieving a steady 6k/week across the whole Model 3 system a few months later.
As part of the drive towards 6k, all Model 3 production at Fremont will move to 24/7operations. This means that we will be adding another shift to general assembly, body and paint. Please refer anyone you know who you think meets the Tesla bar for talent, drive and trust. Between Fremont and Giga, Tesla will be adding about 400 people per week for several weeks.
Precision
Most of the design tolerances of the Model 3 are already better than any other car in the world. Soon, they will all be better. This is not enough. We will keep going until the Model 3 build precision is a factor of ten better than any other car in the world. I am not kidding.
Our car needs to be designed and built with such accuracy and precision that, if an owner measures dimensions, panel gaps and flushness, and their measurements don’t match the Model 3 specs, it just means that their measuring tape is wrong.
Some parts suppliers will be unwilling or unable to achieve this level of precision. I understand that this will be considered an unreasonable request by some. That’s ok, there are lots of other car companies with much lower standards. They just can’t work with Tesla.
Profit
A fair criticism leveled at Tesla by outside critics is that you’re not a real company unless you generate a profit, meaning simply that revenue exceeds costs. It didn’t make sense to do that until reaching economies of scale, but now we are there.
Going forward, we will be far more rigorous about expenditures. I have asked the Tesla finance team to comb through every expense worldwide, no matter how small, and cut everything that doesn’t have a strong value justification.
All capital or other expenditures above a million dollars, or where a set of related expenses may accumulate to a million dollars over the next 12 months, should be considered on hold until explicitly approved by me. If you are the manager responsible, please make sure you have a detailed, first principles understanding of the supplier quote, including every line item of parts & labor, before we meet.
I have been disappointed to discover how many contractor companies are interwoven throughout Tesla. Often, it is like a Russian nesting doll of contractor, subcontractor, sub-subcontractor, etc. before you finally find someone doing actual work. This means a lot of middle-managers adding cost but not doing anything obviously useful. Also, many contracts are essentially open time & materials, not fixed price and duration, which creates an incentive to turn molehills into mountains, as they never want to end the money train.
There is a very wide range of contractor performance, from excellent to worse than a drunken sloth. All contracting companies should consider the coming week to be a final opportunity to demonstrate excellence. Any that fail to meet the Tesla standard of excellence will have their contracts ended on Monday.
Btw, here are a few productivity recommendations:
– Excessive meetings are the blight of big companies and almost always get worse over time. Please get of all large meetings, unless you’re certain they are providing value to the whole audience, in which case keep them very short.
– Also get rid of frequent meetings, unless you are dealing with an extremely urgent matter. Meeting frequency should drop rapidly once the urgent matter is resolved.
– Walk out of a meeting or drop off a call as soon as it is obvious you aren’t adding value. It is not rude to leave, it is rude to make someone stay and waste their time.
– Don’t use acronyms or nonsense words for objects, software or processes at Tesla. In general, anything that requires an explanation inhibits communication. We don’t want people to have to memorize a glossary just to function at Tesla.
– Communication should travel via the shortest path necessary to get the job done, not through the “chain of command”. Any manager who attempts to enforce chain of command communication will soon find themselves working elsewhere.
– A major source of issues is poor communication between depts. The way to solve this is allow free flow of information between all levels. If, in order to get something done between depts, an individual contributor has to talk to their manager, who talks to a director, who talks to a VP, who talks to another VP, who talks to a director, who talks to a manager, who talks to someone doing the actual work, then super dumb things will happen. It must be ok for people to talk directly and just make the right thing happen.
– In general, always pick common sense as your guide. If following a “company rule” is obviously ridiculous in a particular situation, such that it would make for a great Dilbert cartoon, then the rule should change.
If there is something you think should be done to make Tesla execute better or allow you to look forward to coming to work more (same thing in the long term), please send a note to [redacted]
Thanks for being such a kickass team and accomplishing miracles every day. It matters. We are burning the midnight oil to burn the midnight oil.
Elon
Source: medium@drury
Marcus Aurelius evening routine
- Eliminate external stimulation (Turn off mobile/TV).
- Physical movement (Sports, walking).
- Reflect on your day (Gratitude).
- What would X do (Role model: Elon Musk).
- View from above (How do I present myself, how do others see me).
- Spend time with family.
- Prepare for the morning (To-do list).