Author: GullCode
KAFKA
KAFKA is in all mouths these days. So I share here, also as a reminder for me, a couple of #KAFKA ressources that looked helpful to me.
TLDR:
Do not use KAFKA for:
-“Little” Data flows (overkill)
-Streaming ETL (handling transformation is a hassle)
-Store and process large files (images, videos, proprietary files, etc.)
https://www.kai-waehner.de/blog/2020/08/07/apache-kafka-handling-large-messages-and-files-for-image-video-audio-processing/
https://www.upsolver.com/blog/apache-kafka-use-cases-when-to-use-not
https://kafka.apache.org/intro
https://docs.confluent.io/kafka-clients/librdkafka/current/overview.html
https://docs.confluent.io/platform/current/clients/librdkafka/html/md_INTRODUCTION.html
Why gettimeofday() is bad at timing things
I was reading a changelog from a library I love (unrelated but here is the link: https://liballeg.org/ ) and I stumble upon that change:
“Use clock_gettime with CLOCK_MONOTONIC instead of gettimeofday (check-switch-26)”
Then I did a bit of research on the topic, and found a good explanation here:
https://blog.habets.se/2010/09/gettimeofday-should-never-be-used-to-measure-time.html
TLDR: if you use gettimeofday to time things then your program may be affected by time shift, because gettimeofday is not monotonic. if you do not care about the date and only about elapsed time, use clock_gettime.
Updated Recon on portapack-mayhem
See https://www.nilorea.net/hackrf-portapack/ for latest version
Because Mezerg is amazing.
HackRF Portapack Mayhem Firmware, Search/Freqman evolution branch
On top of the existing ‘search and stay X seconds after a match’ the SearchApp have been updated with a ‘search and stay’ mode: stay while matching, leave after X seconds of inactivity, reset counters on activity during the wait. mode,
To use it just specify a negative value in the ‘wait’ field using the rotary encoder.
As some have some problems getting the bin back from discord, here you are:
The documentation is on the wiki, here:
Learn How To Code
A lot of us already know the excellent https://openclassrooms.com/fr/
There is also, in a more game dev oriented way, https://www.codingame.com/start or https://codecombat.com/
Learning is fun, but it it even funnier if you’re learning while gaming 😉
X-D
CSS trick for rowspan and nth-child matching
If ever you try to make a table with a single <td> matching more than one line using rowspan, your css that was using nth-child to customize each column is working badly. Only the first line of each rowspan is correctly recognized by the nth-child. All other lines are all shifted by one.
That’s because the css engine is not taking in accound the rowspan attribute.
Solution:
In my case it was to add all the <td> hidden by the rowspan like <td style=”display:none”> so they are here for the css engine to count properly, but not displayed at all.
grep: exclude grep from ps results
Tip: use a regexp so the grep is not matching the line where is sits in ps list:
ps -aef | grep "[m]atchingexp"
will match anything starting with letter ‘m’ and followed by ‘atchingexp
‘ , which will not be in the ps list as it will contain the [] around the first letter of your match
grep: retain colors when piping
By default grep -color
is not producing color symbols if it detects that the output is not a terminal.grep -color=auto
is doing the same, that is not producing color symbols if it detects that the output is not a terminal.
The solution is to use “grep -color=always“ in the place that need it.
Do not put it in an alias of grep as it would break some code somewhere else. Color symbols are strings like “ESC[35m” and they will be inserted in the text.
Ouch !
Orion and a piece of Perseus
Krampus Hack 2021
KrampusHack is a Secret Santa game jam. This means that participants secretly make a game for someone else, suited to their wishes.
Here is a video of all 9 finisher entries. Have fun 🙂
Recursive grep FTW
In case you’re trying to search recursively for a specific file type and data mask, grep -r is not enough to bring the desired result.
You’ll have to use –include ‘type’ and then, even if the directory does not contain any of the given filetype in root, it’s still working.
Example;
grep -r --include '*.extension' 'Text to match' directory
grep -r --include '*.cpp' 'Audio' .