From 34e9d844f1ab843f94f90feb1a9399e5d3f9a384 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Thu, 12 Sep 2019 20:49:42 +0200 Subject: [PATCH] a lot of changes at once --- .export/bw-functions.html | 236 +++++++++++++++++++++++ .export/emacs.html | 382 ++++++++++++++++++++++++++++++++++++++ ausbau/kueche.org | 6 +- emacs.org | 276 +++++++++++++++++++++++++++ learning/org.org | 12 +- notes.org | 2 - steuererklaerung.org | 94 ++++++++++ 7 files changed, 997 insertions(+), 11 deletions(-) create mode 100644 .export/bw-functions.html create mode 100644 .export/emacs.html create mode 100644 emacs.org delete mode 100644 notes.org create mode 100644 steuererklaerung.org diff --git a/.export/bw-functions.html b/.export/bw-functions.html new file mode 100644 index 0000000..6155ca5 --- /dev/null +++ b/.export/bw-functions.html @@ -0,0 +1,236 @@ + + + + +bw-cloud-functions + + + + + + + + + + + + + +
+
+

bw-cloud-functions

Thomas Ruoff

Created: 2019-08-13 Tue 23:18

+
+ +
+
+

Logos in Analytics

+

+A Logo Query contains a set of logo versions. +

+ +

+Our backend identifies them by an URL that resolves with a PNG of that logo +version. +

+ +

+The URL and the PNG is controlled by Logograb (our logo detection provider). +

+ +
+
+
+
+

Showing Logos in Analytics

+

+We show the logo versions in various places in Analytics, also in the chart exports. +

+ +

+Though the PNGs used by Logograb are not optimized for displaying, especially +not on a whitish background. +

+ +
+
+
+
+

1st try

+

+Detect whitish logos in the client and add a dark background if it’s a whitish +logo. +

+ +
+
+
+
+

Problems

+

+Detection runs every single time a logo is shown. +

+ +

+It runs on the client. +

+ +

+We couldn’t make it work in certain places, especially in highcharts and +obviously exported charts. +

+
+
+
+
+

2nd try

+

+Move the detection and conversion to the server. +

+ +
+
+
+
+

Wins

+

+Browser caches converted image. +

+ +

+Client stays slim. +

+ +

+We can just use an image URL in the frontend and chart export service. +

+ +
+
+
+
+

Problems left

+

+Requested logos are cached only in memory. +

+ +

+Not seperate +

+ +
+
+
+
+

3rd try

+

+Frontend was moved to CDN while this happend. +

+ +

+Cloudfront seemed to support what we needed: execute some JS when the response +of an origin came back, so we could place detection and conversion before +returning it to the client and storing it in the CDN. +

+ +
+
+
+
+

no wins, just problems

+

+Turns out no way even access on the body, so no way to detect nor modify that +body. :( +

+ +
+
+
+
+

4th try

+

+CDN directs logo URL calls directly to a cloud function. +

+ +

+We use bw-cloud-functions to implement conversion and detection. +

+ +
+
+
+
+

wins

+

+Re-used detection and conversion we already wrote in JS in the 2nd try. +

+ +

+Super easy deployment +

+ + +

+Still makes it’s way into the CDN store +

+
+
+
+
+

problems left

+

+Well, we misunderstood how a CDN actually works. It’s NOT a storage as it +removes content that is not requested often enough in a region, so just a very +small TTL in the cache. +

+ +

+To be fair, it’s not too bad the costs for all logo versions we currently get is +still pretty low and does not really justify to spend more time on it. +

+ +
+
+
+
+

5th try (to be done)

+

+Use cloud storage to store converted images and check there first, before doing +a fetch, detect an maybe do a conversion dance. +

+
+
+
+
+

Created by Thomas.

+ + + + + diff --git a/.export/emacs.html b/.export/emacs.html new file mode 100644 index 0000000..dbf07d6 --- /dev/null +++ b/.export/emacs.html @@ -0,0 +1,382 @@ + + + + + + + + + + + + + + + +
+
+

Created: 2019-08-12 Mon 23:09

+
+
+ +
+

+To get a list of packages type M-x list-packages +

+ +
+
+

1 to research

+
+
+
+
+

1.1 backup file location configurable?

+
+
+

1.2 highlight line

+
+
+

1.3 git gutter needed

+
+
+

1.4 what the hell is that footer thing you cannot edit?

+
+
+

1.5 C-o does not open last file, not sure why yet

+
+
+

1.6 persistant undo possible?

+
+
+

1.7 helm/ivy - dash?

+

+Still trying to figure what use-case each of these tries to +solve. I’m primarily looking for something that offers me an nice +interface to deal with all kind of lists of elements, like files, +buffers, commits, tags, grepper etc. +

+ +

+I used to cover that all with vim.fzf and would again like to have +something like that. +

+ +

+Though it seems, that I just need some inteface for lists of any +kind that I can easily fuzzy search. +

+ +

+And other plugins to actually provide the content. +

+ +
+
+

1.8 gruvbox-theme

+
+
+

1.9 which-key

+

+Seems great for learning the editor commands. But could also be +distracting +

+ +
+
+

1.10 magit

+
+
+

1.11 language server protocol

+

+Mainly for my JS work, but probably worth to look at something +generic if there is something out there. +

+ +
+
+

1.12 vim-unimpaired ?

+

+Couln’t find something replicating unimpaired until now. +

+ +

+Maybe I just need to roll most of these on my own +

+ +
+
+

1.13 vim-abolish ?

+
+
+

1.14 ranger/dired-ranger

+
+
+

1.15 devdocs

+ +
+
+
+
+

2 installed packages

+
+
+
+
+

2.1 general

+
+
+
+
+

2.1.1 editorconfig

+
+
+

2.1.2 helm

+
+
+

2.1.3 projectile

+
+
+

2.1.4 magit

+
+
+

2.2 evil related

+
+
+
+
+

2.2.1 evil

+

+evil uses “state” for the “modes” in vi. The term “mode” is already used in emacs +for a set of key bindings for a cetrain sort of text. A “mode’ may include custom +bindings for evil states. +

+ +

+The state is shown in the status bar. +

+ +

+There is also an emacs state <E>, basically turn off evil, which you can +toggle with ’C-z’. +

+ +

+I’ve heard numerous times that people claim evil covers 99% of what they use in vim. +[[evil-maps.el][~/.emacs.d/elpa/evil-20190729.704/evil-maps.el] is a good place +to start looking if something does not work for you. +

+ +
+
+

2.2.2 evil-escape

+
+
+

2.2.3 evil-leader

+

+I was first not sure if I should even start using the leader key +as I did in my vim config, as it would again not bring me further +in learning the standard key bindings vim offers. +

+ +

+This is still a valid point, but I also feel it will slow me down +quite a bit, now that I’m considering to switch to Emacs. +

+ +

+So I’ll start with using it, but keep it very high in my priorities +to finally getting rid of it. +

+ +

+This is pretty important, as I’m pretty sure that I’ll still be using +Vim in quite some remote systems. +

+ +
+
+

2.2.4 evil-surround

+
+
+

2.2.5 evil-magit

+
+
+

2.2.6 evil-org

+
+
+

2.3 org-mode related

+
+
+
+
+

2.3.1 org-bullets

+

+UTF-8 bullets +

+ +
+
+
+
+

3 considering packages

+
+
+
+
+

3.1 general

+
+
+

3.2 evil related

+
+
+
+
+

3.2.1 evil-args

+
+
+

3.2.2 evil-matchit

+
+
+

3.2.3 evil-collection

+

+This seems to use vim like keybindings in most common emacs +places. Not sure yet if this is a good idea. +

+
+
+

3.3 org-mode related

+
+
+
+
+

3.3.1 org-download

+

+image d’n’d +

+
+
+

3.3.2 org-gcal

+
+
+

3.3.3 org-jira

+
+
+

3.3.4 org-projectile

+
+
+

3.3.5 org-pandoc

+
+
+

3.3.6 org-reveal

+
+
+
+
+ + + + + diff --git a/ausbau/kueche.org b/ausbau/kueche.org index 4636043..f4b6a14 100644 --- a/ausbau/kueche.org +++ b/ausbau/kueche.org @@ -18,7 +18,7 @@ ** TODO Tür bestellen Hornbach Petura Kiefer oder Fichte? ** TODO Einbauen -* Wände [0%] +* Wände [31%] ** Decke [50%] *** DONE Lattung CLOSED: [2019-07-06 Sat 23:13] @@ -29,12 +29,12 @@ *** TODO Lampenloch gipsen *** TODO Grundieren *** TODO Tapezieren -** Badseite [40%] +** Badseite [60%] *** DONE Grundieren CLOSED: [2019-07-06 Sat 23:13] *** DONE Rigips CLOSED: [2019-07-06 Sat 23:13] -*** TODO Tapete voll ablösen +*** DONE Tapete voll ablösen *** TODO Löcher ausbessern *** TODO Verspachteln ** Esszimmerseite [0%] diff --git a/emacs.org b/emacs.org new file mode 100644 index 0000000..fa425b5 --- /dev/null +++ b/emacs.org @@ -0,0 +1,276 @@ +To get a list of packages type ~M-x list-packages~ + +* Intersting learnings +** Help systems +~SPC h RET~ emacs manual + +~C-h a~ appropos +~C-h l~ list 300 last keystrokes with description +~C-h m~ docs to major and minor modes activg + +~C-h k~ what does a keybinding X do +~C-h w~ which keybinding is active for X +* Elisp +Following this [[http://ergoemacs.org/emacs/elisp.html][Practical Emacs Lisp]] + +** Basics +*** Eval code block with ~C-c C-c~ +#+BEGIN_SRC elisp +(+ 547 1) +#+END_SRC + +#+RESULTS: +: Result 548 +*** Eval last expression with ~C-x C-e~ +*** Printing with (message ...) +#+BEGIN_SRC elisp +(message "Result %S" (+ 547 1)) +#+END_SRC + +#+RESULTS: +: Result 548 +*** Arithmetic +Singel digit numbers as ~2.~ are integers. Use ~2.0~ for floats. + +#+BEGIN_SRC elisp +(+ 4 5 1) ; 10 +(- 9 2) ; 7 +(- 9 2 3) ; 4 +(* 2 3) ; 6 +(* 2 3 2) ; 12 + +;; integer part of quotient +(/ 7 2) ; 3 + +;; division +(/ 7 2.0) ; 3.5 + +;; mod, remainder +(% 7 4) ; 3 + +;; power; exponential +(expt 2 3) ; 8 + +;; int to float +(float 3) ; 3.0 + +(truncate 3.3) ; 3 + +(floor 3.3) ; 3 + +(ceiling 3.3) ; 4 + +(round 3.4) ; 3 +#+END_SRC + +*** Convert string and numbers +#+BEGIN_SRC elisp +(string-to-number "547") +(number-to-string 547) +#+END_SRC +*** True and False +**** ~nil~ is false +**** anything else is true, +**** nil is equivalent to a empty list ~()~, so also false +**** ~t~ is by convention true +*** and/or/not +#+BEGIN_SRC elisp +(and t nil) +(or t nil () t) +(not (and t t)) +#+END_SRC +*** comparing +#+BEGIN_SRC elisp +; numbers +(< 3 4) +(>=_ 3 4) +(= 3 3.0000000000000000000000001) +(/= 3 4) ; not equal + +;strings +(equal "abc" "abc") ; checks +(string-equal "string" "strings") +(string-equal "symbol" 'symbol) ; can be used to compare string with symbol + +; generic equal - checks datatype and value +(equal 3 3) ; t +(equal 3 3.0) ; nil +(not (equal 3 4)) ; t. general way to test inequality +#+END_SRC +*** variables +**** global +#+BEGIN_SRC elisp +(setq x 1) +(setq x 2 y 3 z -1) +#+END_SRC +**** local +#+BEGIN_SRC elisp +(let name "value") + +(let (name1 name2) + (setq name1 "Gustav") + (setq name2 "Gustl") + (+ 40 2) ; return value, optional +) + +; or even shorter +(let ((name1 "Gustav") (name2 "Gustl")) + "Gustav+Gustl" ; return value, optional +) +#+END_SRC +*** if then else +#+BEGIN_SRC elisp +(if (< 3 2) "yay" "nay") +(if (< 1 2) "yay") ; no else, nil +; no else, clearer to use ~when~. All args executed. +(when (< 1 2) (setq a 1) (setq b 2)) ; a=1 and b=2 +#+END_SRC + +#+RESULTS: +: 2 + +*** block of expressions +Same as a code block in C-like languages ~{...}~ + +#+BEGIN_SRC elisp +(progn (message "a") (message "b")) +#+END_SRC + +Often used inside ~if~ + +#+BEGIN_SRC elisp +(if something + (progn ; true + (message "something is t") + (message "yay") + ) + (progn ; else + (message "something is nil") + (message 'nai') + ) +) +#+END_SRC +*** loops +#+BEGIN_SRC elisp +;; inserts Unicode chars 32 to 126 +(let ((x 32))) +(let ((r ""))) +(while (< x 127) + (setq r (concatenate 'string r (char-to-string x))) + (setq x (+ x 1))) +(message "%s" r) +#+END_SRC + +#+RESULTS: +: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ + +* to research +** backup file location configurable? +** highlight line +** git gutter needed +** what the hell is that footer thing you cannot edit? +** ~C-o~ does not open last file, not sure why yet +** persistant undo possible? +** helm/ivy - dash? + + Still trying to figure what use-case each of these tries to + solve. I'm primarily looking for something that offers me an nice + interface to deal with all kind of lists of elements, like files, + buffers, commits, tags, grepper etc. + + I used to cover that all with vim.fzf and would again like to have + something like that. + + Though it seems, that I just need some inteface for lists of any + kind that I can easily fuzzy search. + + And other plugins to actually provide the content. + +** gruvbox-theme +** which-key + Seems great for learning the editor commands. But could also be + distracting + +** magit +** language server protocol + Mainly for my JS work, but probably worth to look at something + generic if there is something out there. + +** vim-unimpaired ? + + Couln't find something replicating unimpaired until now. + + Maybe I just need to roll most of these on my own + +** vim-abolish ? +** ranger/dired-ranger +** devdocs + +* installed packages +** general +*** editorconfig +*** helm +*** projectile +*** magit +** evil related +*** evil + + evil uses "state" for the "modes" in vi. The term "mode" is already used in emacs + for a set of key bindings for a cetrain sort of text. A "mode" may include custom + bindings for evil states. + + The state is shown in the status bar. + + There is also an emacs state , basically turn off evil, which you can + toggle with 'C-z'. + + I've heard numerous times that people claim evil covers 99% of what they use in vim. + [[evil-maps.el][~/.emacs.d/elpa/evil-20190729.704/evil-maps.el] is a good place + to start looking if something does not work for you. + +*** evil-escape +*** evil-leader + I was first not sure if I should even start using the leader key + as I did in my vim config, as it would again not bring me further + in learning the standard key bindings vim offers. + + This is still a valid point, but I also feel it will slow me down + quite a bit, now that I'm considering to switch to Emacs. + + So I'll start with using it, but keep it very high in my priorities + to finally getting rid of it. + + This is pretty important, as I'm pretty sure that I'll still be using + Vim in quite some remote systems. + +*** evil-surround +*** evil-magit +*** evil-org +** org-mode related +*** org-bullets + UTF-8 bullets + +* considering packages +** general +"So now " it makes really fun to work like this +#+BEGIN_SRC elisp +(print "blup") +#+END_SRC + +#+BEGIN_SRC lisp + +#+END_SRC +** evil related +*** evil-args +*** evil-matchit +*** evil-collection + This seems to use vim like keybindings in most common emacs + places. Not sure yet if this is a good idea. +** org-mode related +*** org-download + image d"n'd +*** org-gcal +*** org-jira +*** org-projectile +*** org-pandoc +*** org-reveal diff --git a/learning/org.org b/learning/org.org index f6b3df7..46ec38c 100644 --- a/learning/org.org +++ b/learning/org.org @@ -40,12 +40,12 @@ **** TODO tables ***** TODO spreadsheets ** How to do things -**** Add a sibling ~CTRL-Enter~ -**** Add a sibling with TODO ~CTRL-Shift-Enter~ -**** Denote subtree ~,sl~ or ~>~ or ~TAB~ in insert mode -**** Promote subtree ~,sh~ or ~<~ or ~S-TAB~ in insert mode -**** todo -***** toggle todo state ~,TT~ +*** Add a sibling ~CTRL-Enter~ +*** Add a sibling with TODO ~CTRL-Shift-Enter~ +*** Denote subtree ~,sl~ or ~>~ or ~TAB~ in insert mode +*** Promote subtree ~,sh~ or ~<~ or ~S-TAB~ in insert mode +*** todo +**** toggle todo state ~,TT~ * Footnotes [fn:1] Hey ho, this is a footnote and I don't really have a use-case for it but it's nice than I can add one :) diff --git a/notes.org b/notes.org deleted file mode 100644 index 2c61421..0000000 --- a/notes.org +++ /dev/null @@ -1,2 +0,0 @@ -#+TITLE: ad hoc notes - diff --git a/steuererklaerung.org b/steuererklaerung.org new file mode 100644 index 0000000..f411f37 --- /dev/null +++ b/steuererklaerung.org @@ -0,0 +1,94 @@ +#+TITLE: Steuererklärung + +* Kinder +** TODO Kitagebühren Jacob +** TODO Kitagebühren Anna +* Valerie +** DONE Elternzeit +CLOSED: [2019-09-04 Wed 20:32] +01.01.2018-27.10.2018 +** DONE Pendlerpauschale Arbeitstage im Büro +CLOSED: [2019-09-04 Wed 20:41] +* Thomas +** DONE Elternzeit +CLOSED: [2019-09-04 Wed 20:32] +28.10.2018-27.10.2018 +** TODO Elterngeld Januar wirklich richtig? +** TODO Arbeitstage im Büro +** TODO VVS Kosten +** TODO HH6 versteuerbare Einkünfte +* Versicherungen +** TODO Haftpflicht +* Mömpelgardgasse +** DONE Handwerker +*** Schornsteinfeger Wiech 29.06.2018 +| Was | Betrag | +|------------+--------| +| Lohnkosten | 58,20 | +*** Rauch Heizungkörper 05.11.2018 +| Was | Betrag | +|------------+--------| +| Lohnkosten | 1739 | +| | | +*** Rauch Heizungswartung 14.06.2018 +| Was | Betrag | +|------------+--------| +| Lohnkosten | 119 | +*** Rauch Frostschaden 06.03.2018 +| Was | Betrag | +|------------+--------| +| Lohnkosten | 52 | +#+TBLFM: @4$2=vsum(@2..@-1) +*** Leopold 11.06.2018 +| Was | Betrag | +|----------------------+--------| +| Demontage/Monatge | 850.0 | +| Altfenster entsorgen | 72.0 | +|----------------------+--------| +| Summe | 922 | +#+TBLFM: +*** Bauer 16.05.2018 +| Was | Betrag | +|---------+--------| +| Montage | 742,50 | + +*** Morgenrot 10.10.2018 +| Was | Betrag | +|--------+--------| +| Lohn 1 | 1600 | +| Lohn 2 | 345 | +| Gerüst | 200 | +|--------+--------| +| Summe | | +** Kontoführungsgebühren +** Reparaturen +** DONE Grundsteuer 52,59 +** Müllgebühren +** Wasser +** Strom +Nur wenn wir grenze noch nicht erreichen + +Zeitraum 10.9.2018 18.9.2018 +unten 1053,97 +oben 150,31 +** Versicherung +*** TODO Wohngebäudeversicherung +* Auto +** Reperaturen + +| Time | durP1 | ratioP1 | P1 | durP2 | ratioP2 | P2 | SDS_P1 | SDS_P2 | Temp | Humidity | BMP_temperature | BMP_pressure | BME280_temperature | BME280_humidity | BME280_pressure | Samples | Min_cycle | Max_cycle | Signal | | | +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | | | +| 2019/01/01 00:01:06 | | | | | | | 63.70 | 41.53 | | | | | | | 3.81 | 100.00 | 95765.69 | 1775028 | 77 | 24342 | -86 | +| 2019/01/01 00:03:57 | | | | | | | 68.02 | 42.23 | | | | | | | 3.88 | 100.00 | 95770.13 | 1800911 | 77 | 24249 | -86 | +| 2019/01/01 00:06:47 | | | | | | | 45.90 | 30.88 | | | | | | | 4.06 | 100.00 | 95783.44 | 1782144 | 79 | 24268 | -87 | +| 2019/01/01 00:09:37 | | | | | | | 52.83 | 35.45 | | | | | | | 4.16 | 100.00 | 95778.77 | 1796475 | 80 | 24261 | -85 | +| 2019/01/01 00:12:27 | | | | | | | 44.98 | 32.88 | | | | | | | 4.01 | 100.00 | 95770.27 | 1766860 | 80 | 24278 | -85 | +| 2019/01/01 00:15:18 | | | | | | | 34.63 | 25.70 | | | | | | | 4.02 | 100.00 | 95773.95 | 1837415 | 78 | 24248 | -85 | +| 2019/01/01 00:18:08 | | | | | | | 34.75 | 26.17 | | | | | | | 4.13 | 100.00 | 95770.08 | 1838041 | 78 | 24243 | -85 | +| 2019/01/01 00:20:59 | | | | | | | 38.00 | 22.65 | | | | | | | 4.30 | 100.00 | 95768.03 | 1837785 | 78 | 24264 | -87 | +| 2019/01/01 00:23:49 | | | | | | | 37.80 | 23.95 | | | | | | | 4.16 | 100.00 | 95764.53 | 1842532 | 77 | 24770 | -88 | +| 2019/01/01 00:26:40 | | | | | | | 38.30 | 25.92 | | | | | | | 4.19 | 100.00 | 95763.36 | 1846767 | 77 | 24329 | -85 | +| 2019/01/01 00:29:30 | | | | | | | 34.78 | 24.47 | | | | | | | 4.00 | 100.00 | 95762.17 | 1814816 | 77 | 24269 | -86 | +| 2019/01/01 00:32:20 | | | | | | | 45.30 | 30.68 | | | | | | | 3.85 | 100.00 | 95760.94 | 1807797 | 78 | 24250 | -85 | +| 2019/01/01 00:35:11 | | | | | | | 46.83 | 29.90 | | | | | | | 3.73 | 100.00 | 95758.04 | 1808862 | 78 | 24798 | -86 | +| 2019/01/01 00:38:01 | | | | | | | 50.35 | 30.23 | | | | | | | 3.72 | 100.00 | 95753.83 | 1806262 | 78 | 24283 | -86 |