Tidbits tagged with #knowledgebase (30)
HTML is getting more and more semantic it seems.
I am seriously wondering what this means for building things like a blog, like this one
here. It becomes more and more reasonable to write pure HTML, instead of markdown, doesn't it?
Maybe I am just late and just learned about some HTML elements now. What a shame.
Continue reading →
I never did android development, only the React Native side of things.
Now while digging deeper, trying to figure out how to style a React Native picker on android (because the default is really ugly)
I am reading into android docs. I found out how to break my app's rendering with one line of XML. Not true, five lines of XML.
Continue reading →
When I started digging into the styles.xml
file of our React Native app I found XML like this:
Continue reading →
I had deleted a git branch locally, which I wanted to restore.
It's totally easy. A tiny bit of knowledge upfront. There is something called the reflog, it's kinda
like the hidden git history, that knows every change you did on the repo, every change, and it
does NOT throw away anything.
Continue reading →
I want to use my real android device to preview stuff, not the emulator anymore.
If I don't get the CPU power I need, I need to work around it.
Continue reading →
I was just struggling to find out how to start a different emulated Android device from the command line.
I found the relevant commands:
Continue reading →
On a friend's linkedin profile I saw some links to his content and since linkedin
picks up in traffic and professional relevance, I thought
I need to get my site's traffic better shareable.
Continue reading →
I wanted to scriptNode.cloneNode(true)
and expected it to re-evaluate the JS
of the node, but it didn't.
Continue reading →
First search result for "CSS reset" is by the mighty Eric Meyer
https://meyerweb.com/eric/tools/css/reset/ from quite some time ago.
And looking up the source of his site I see the reset is not really included, also no modified version
as far as I saw it.
Next I came across https://cssreset.com/what-is-a-css-reset/ which nicely explains the whys
and also states the cons. Unfortunately the latter article is missing a date, so I can't say how old
this knowledge is. That's why I was so very keen on having all items properly dated on my blog.
Continue reading →
The things I took away for me until now, while I am still reading the book:
Continue reading →
In October 17, 1990 IMDb started as a unix script.
December 25, 1990 Tim Berners-Lee releases WorldWideWeb (later Nexus) on Christmas day, the first ever browser for the web.
August 6, 1991 Tim Berners-Lee responding to a thread on the alt.hypertext Usenet newsgroup, publicly announces the World Wide Web project for the first time.
The History of the Web has so interesting stuff. Very worth a read. A great site to spend a lot of time on.
I was just filtering a list list.filter(someCondition)
and I only wanted the first element in case there is one.
Doing list.filter(someCondition)[0]
fails when the filtered list
is empty. So I am using slice(0, 1)
, which returns the first element
if there is one, an empty list otherwise.
Now I do list.filter(someCondition).slice(0, 1)
and never list.filter(someCondition)[0]
.
Such small things.
Continue reading →
WebStorm has this awesome feature they call Live Templates
where you can configure a text in a certain filetype to autocomplete
to something, even dynamic. See how I built the auto-completion for dateC
which becomes
dateCreated: 2020-05-02 15:27 CET
, which is current date of course, in my custom format.
Continue reading →
There is nothing new about websites being backwards compatible. The HMTL Design Principles from the W3C are from
November 2007 and they are not outdated!
Continue reading →
While hunting for accessibility resources, especially the reasons why designs need to be flexible
I came across this article Accessible CSS on WebAIM.org.
And their warning sign just needs to be shown around the web even more.
Continue reading →
I found a couple hints, but this one might be the best one.
https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker
I actually changed parts
Continue reading →
I use docker images to provide the environment for development. My nodejs
is installed only inside the docker image. That means I always map my working directory
into the container. This means I don't need to send no build context to the docker deamon.
Continue reading →
I still often type document.querySelector()
or document.querySelectorAll()
even though even before this was available in the browser the developer consoles, FireBugs or whatever
they were called had a shorter version available $
and $$
. Yep, it works almost exactly the
same, just that one returns a NodeList
the other an array. Just try it.
It works in all browsers as far as I know, I tried Firefox, Safari, Chrome and Edge.
See the image below for how it works in Firefox.
Continue reading →
I always struggled with it. Actually I looked it up a couple days ago and until today I was under
the assumption "than" was for time and ordering, I had been confused and wrong.
Continue reading →
https://webaim.org/
with lots of interesting resources
and stuff to learn.
Click below to see the code which creates this kinda dropdown, it is the <details>
element.
Continue reading →
Wondering how to layout and use <section>
, <h1>
, <h2>
, etc. I came across
the first place one should read on MDN
Using HTML sections and outlines
also very insightful and more specific is this on the W3C wiki
HTML/Usage/Headings/Missing.
If you have 27 minutes to learn how to use all those semantic tags watch Brian Haferkamp's
Semantic Elements and Structure a very well explained video.
I read it multiple times already in Measure What Matters
by John Doerr, that OKRs are flexible. I normally underline those things, but now I have to note it somewhere where I can find it again without physically needing the book. On page 54 he writes
Continue reading →
I didn't know that for English "sources disagree on the details of capitalizing prepositions". I read so often "capitalize all words of four letters or more". What an arbitrary rule is that? Ok, I will try to follow this and capitalizing all "major words", they call them.
There are a couple (SEO) sites that capitalize your headline correctly, you'll find them when you need 'em.
TL;DR use any/all of docker system prune
, docker container prune
, docker image prune
, docker volume prune
or docker network prune
to free the according space.
Continue reading →
Run npm install <package>@latest
to update to the latest version of a package,
no matter the minor, major version, it always goes to the latest.
diff --recursive <dir1> <dir2>
to diff the files and their contents in two directories
I just needed to do some golden master tests after updating a dependency
Learning stuff about nodejs (or v8) while writing tests that ensure runtime behaviour,
using process.cpuUsage and process.memoryUsage. Curious how brittle those tests become over time.
Glad the app ALWAYS runs in the same docker container (dev and prod).
Continue reading →
Why a #mocha #test times out, when I write it like this: it('...', _ => {});
but it does NOT time out,
when I write: it('...', () => {});
? Exactly, because the _
is the magic done
, that one needs to call.
Continue reading →