Letzte Aktualisierungen Kommentarverlauf ein-/ausschalten | Tastaturkürzel

  • Andreas 10:35 am 19. September 2022 permalink  

    LogSeq – Show all TODOs, NOWs in your journale 

    Simple query to show all TODOs and NOW task in your journal:
    {:title „🔨 TODO“  :query [:find (pull ?b [*])  :where  (task ?b #{„TODO“, „NOW“})]}
    (props to StoveipipeCats on  reddit)
  • Andreas 15:27 am 14. September 2022 permalink  

    High kernel_task cpu load on Macbook Pro 

    There are plenty of posts on the kernel_task problem of MacBooks (Pro). There is no single solution for this problem. Often you can’t do anything about it except getting a new MaBook. But here is a (incomplete) list of things that might help:

    1. Yeah, the obvious one. Reset SMC, NVRAM and PRAM (doesn’t really help in my opinion)
    2. Plug the charger into the right USB-C
    3. Check your USB-C hub / dock. Maybe plug in in the charger directly if you’re not happened to own a Caldigit T4 hub
    4. Check your display settings: Disable „High Dynamic Range“
    5. Check your display settings: If you’re using a high resolution like 5k2k try different sync rates. I switched from 60 to 30Hz and that seem to alleviate the issue a bit. And for office purposes 30Hz is ok (at least for me)
    6. Got Settings -> Power Adapter -> Switch on „Lower Power Mode“
    7. Clean the fans (be careful when opening your Macbook and no guarantee that this will help)
  • Andreas 08:57 am 26. August 2022 permalink  

    Reset EnergyTotal of Tasmota smart plug 

    Just go to the console of your Tasmota device and type in „my/mqtt/channel/EnergyReset3 0“. No CMD, no equals signs. Just that. For the commands have a look here: https://tasmota.github.io/docs/Commands/#power-monitoring
  • Andreas 17:14 am 16. August 2022 permalink  

    Connection refused with local development proxy 

    I use koa-proxies for local development. Recently, all of a sudden the proxy stopped working, i.d. the routes where correctly mapped (add logs:true to config), but when I called the service with the proxied port, I only got 503 from the backend.
    After tearing my hair out, I check /etc/hosts file and removed the ip6 localhost entry (::1 localhost). After that I worked fine.
    I spotted that when I doing a curl with -vvv option on. Still don’t know when this got added. I installed cntlm for testing purposes. Maybe that inserted this entry, as this is the only proxy related thing I did around that time.
  • Andreas 11:30 am 11. May 2021 permalink  

    Shell timer 

    The Mac version for Sebastian Daschner’s simple bash timer (github.com/sdaschner/dotfiles/blob/master/bin/timer)

    if [[ "$1" == "" ]];

    then echo "Usage: ${0##*/} [message]"
    exit 1

    echo "timer started for $mins min"

    (sleep $(echo "$1 * 60" | bc) && osascript -e "display alert \"Timebox over for: $message!\"" > /dev/null) &

  • Andreas 17:45 am 11. April 2020 permalink  

    html: base href 

    If you use
    To set the base path, always mind to add the TRAILING slash, to indicate it’s a folder. 

  • Andreas 10:14 am 23. January 2020 permalink  

    JPQL with left outer join 

    To remind my self!
    @OneToOne @JoinColumn(name = "pk_column_name_in_main_table", referencedColumnName = "column_name_in_depeding_table", insertable = false, updatable = false) public Description getDescription() { return this.description; }

    @Column(name = " column_name_in_depeding_table", nullable = true)
    public int getDescriptionId() { return descriptionId; }
    @Column(name ="language) Public String getLanguage(){return language;}

    Now if I want something like

    Select * from main m join depending d on m.pk_column_in_main_table = d.column_name_in_depending_table where d.column_name_in_depending_table is null

    You have to put the where-criteria directly into the „left join“ condition of the jqpl query. If you do it like in SQL and put it in the where-clause, JPA (or at least Eclipselink, haven’t tried Hibernate) creates and „old-style“ (ANSI-89) style query, where the join condition is put in the where-clause and you won’t get any results!

    @NamedQueries({ @NamedQuery(name = Main.FIND_BY_ID, query = "SELECT c FROM Main c left join c.description des on des.language = :language where c.id = :id")}

  • Andreas 08:20 am 17. December 2019 permalink  

    Which visualization should I use? 

    A nice overview of different chart types and when to use them. Scroll down a bit to „Visualization Category“


  • Andreas 17:11 am 20. August 2019 permalink  

    Install Influx 1.7. on Raspian Stretch 

    As I have the latest zwave version 3.0 running, which only is supported by Raspian Strecth, the default InfluxDB that gets installed is version 1.0.2 and not the latest (1.7.x as of 8/2019). In order to get the correct version on your Raspberry, do the following
    1. Add „deb repos.influxdata.com/debian stretch stable“ to „/etc/apt/sources.list.d/influxdb.list“ 2. sudo apt-get update 3. sudo apt-get install influxdb 4. systemctl unmask influxdb.service 5. Enable Influx on boot: sudo systemctl enable influxdb 6. sudo systemctl start influxdb 

  • Andreas 19:24 am 21. May 2019 permalink  

    Set up a embedded Payara 5 for Arquillian tests with DB2 z/OS drivers 

    Despite a lot of tutorials on using embedded Payara with Arquillian, I struggled a while to get the container running. Here are the steps

    Code for configuring and deploying the embedded container

    @Deployment public static Archive createDeployment() throws IOException {
    File[] files = Maven.configureResolver().withMavenCentralRepo(false).loadPomFromFile("pom.xml").resolve("com.ibm:db2jcc4:version1234", "com.ibm:db2jcc_license_cisuz:version1234").withTransitivity().asFile();
    final WebArchive war = ShrinkWrap.create(WebArchive.class, "test.war").addPackages(true, "my.org.backend").addPackages(true, "my.org.exceptions").addAsResource("persistence.xml", "META-INF/persistence.xml").addAsLibraries(files); // add all xml required for the queries
    Files.walk(Paths.get("src/main/resources/META-INF")).forEach(file - >{
    if (file.toFile().isFile() && !file.getFileName().toString().equalsIgnoreCase("MANIFEST.MF") && !file.getFileName().toString().equalsIgnoreCase("persistence.xml")) {
    final String fileName = file.toAbsolutePath().toString();
    final int start = fileName.indexOf("META-INF");
    final String resource = fileName.substring(start - 1);
    war.addAsResource(file.toFile(), resource);
    return war;

    Mind to put the arquillian.xml under „src/test/resources“

    Maven dependencies:
    org.jboss.arquillian.junit arquillian-junit-container 1.4.1.Final test
    org.jboss.shrinkwrap.resolver shrinkwrap-resolver-impl-maven 2.2.6 test
    junit junit 4.12 test
    fish.payara.arquillian arquillian-payara-server-4-embedded 1.0.Beta3 test

Neuen Beitrag erstellen
nächster Beitrag/nächster Kommentar
vorheriger Beitrag/vorheriger Kommentar
zeige/verstecke Kommentare
Zum Anfang gehen
zum Login
Zeige/Verberge Hilfe
Shift + Esc