Posts

    Day 139

    Stack

    DNB

    
    
    

    Bash dtb create.sh script

    Updated the script to create a markdown dtb file to the following:

    FILE=_posts/$(date +%Y-%m-%d)-day$(date +%j).markdown
    DATE=$(date +%Y-%m-%d\ %H:%M:%S\ +0100)
    
    if test -f "$FILE"; then
            vim $FILE
            exit 1
    fi
    
    echo "Creating file $FILE"
    touch $FILE
    echo "Adding stuff"
    
    /bin/cat <<EOM >> $FILE
    ---
    layout: post
    title:  "Day $(date +%j)"
    date:   $DATE
    categories: []
    ---
    
    EOM
    
    vim $FILE

    Now it’s closer to create_or_open.sh and doesn’t overwrite anything if run again by error, doesn’t add any unused parts, and opens the file if it exists already.

    Bash check if file exists

    if test -f "$FILE"; then
            vim $FILE
            exit 1
    fi

    Bash exit script

    exit 1 or whatever status code.

    Bash suppress output of command (bash redirection)

    SO
    command > /dev/null 2>&1 redirects both stdout and stderr to /dev/null
    command &> /dev/null & works for me too, though it may not work in all shells. command > /dev/null still shows errors.


    Day 138: bspwm and some configs

    After another small pause, here comes another längliches post!

    Urxvt -name and settings

    I had been trying to get urxvt to play with i3 scratchpads, but when I set the -name setting I got a vanilla URxvt look.

    You evidently configured the font for a specific application instance rather than for an application class. (SO). To make your settings always apply, set URxvt.font rather than urxvt.font, etc.

    Solved my problem.

    Though at the end, I spent some time looking for a way to grep “name” instead of “class” for URxvt in bspwm and gave up, now typing this on a st terminal and loving every second of it!

    st

    Is the terminal I might start to use everywhere.

    In config.h I changed the font to be static char *font = "DejaVu Sans Mono:pixelsize=12:antialias=true:autohint=true";

    Bspwm

    Decided to give it a try, loving it!

    Scratchbox

    To implement the scratchbox, used the method described in the Arch wiki.

    In bspwmrc,

    t -c scratchterm &
    bspc rule -a scratchterm sticky=on state=floating hidden=on
    

    In sxhkdrc,

    super + minus
        ~/s/scratch
    

    In ~/s/scratch,

    #!/usr/bin/env bash
    id=$(xdotool search --class scratchterm | head -n 1)
    echo $id
    
    if [ "$id" != "" ]
         then
           bspc node "$id" --flag hidden -f
           fi

    I added |head -n 1 so it can better deal with possible multiple terminals of this class, in case I have to restart bspwm for whatever reason.

    Random

    • The hype cycle of working memory training
      • near transfer is much more likely and proven than far transfer
      • in general doesn’t look to optimistic
      • High IQ/WM people benefit the most
      • High spacing seems the best for transfer
        • might be related to all those other “pauses are good you learning” effects
    • Spectrometer using a CD
    • ‘I’ve become very isolated’: the aftermath of near-doomed QF72
      • Like a bad partner, the computer’s systems went crazy then stopped communicating with me.

      • I’ve become very isolated. When you’ve been to the Moon, you can only talk to astronauts.

    • The Copenhagen interpretation of ethics
      • Excellent.
      • The Copenhagen Interpretation of Ethics says that when you observe or interact with a problem in any way, you can be blamed for it. At the very least, you are to blame for not doing more.

      • The program was helping as many people as it could, the only change was explicitly labeling a number of people it wasn’t helping as a “control group”. The response?
        “They should immediately stop this experiment, ” said the Manhattan borough president, Scott M. Stringer. “The city shouldn’t be making guinea pigs out of its most vulnerable.”

    Arch compiling AURs from source

    Didn’t have to do this a long time:

    1. makepkg -Acs
    2. sudo pacman -U x.pkg.tar.xz

    Day 133

    Stack

    • Formalize my Sprint reviews.
    • Three works a week of PI – how do I actually keep track of this? I need an infrastructure.

    Markdown

    Block-level attributes in Jekyll/kramdown/markdown

    This describes amongth other things block-level stuff for Markdown. This is potentially a solution for different footnotes and various other small design tweak I’d like to have on this blog. I can just add a CSS class and then in CSS see what I want to do with it.

    Git diff a file between revisions

    git diff HEAD^^ HEAD file.md – where HEAD^^ is “two revisions back”. Also the option --compact-summary gives number of insertions and deletions.

    Anki steps

    It’s an interesting thing to research someday. This discussion and similar ones can be a reference, along with looking at the graphs and targeting 80% retention.

    In general I really should invest an hour or so to learn everything about Anki, so far it’s been the single most effective tool I have for my memory but am using it on a default and primitive level.

    For now I changed Steps to “1 10 60” and “10 60”, new interval to 30%.

    To print for The Road

    • https://mnielsen.github.io/notes/quotes/quotes.html
    • https://www.cl.cam.ac.uk/~afb21/CognitiveDimensions/CDtutorial.pdf
    • https://github.com/progit/progit2/releases/download/2.1.146/progit.pdf
      • till page 123 or so
    • https://colah.github.io/posts/2015-09-Visual-Information/

    Day 131

    Stack

    • Remember that Eisenhower Matrix is a thing and that it used to help me quite a lot before.
    • I should formalize all the checklists I created for myself and use them.
    • Look into Energy Management vs Time management
      • https://hbr.org/2007/10/manage-your-energy-not-your-time
      • https://www.coachingpositiveperformance.com/energy-management-vs-time-management/
      • etc.
    Read more...

    Day 127

    Stack

    Chrony would solve most of my NTP problems.

    Read more...

    Day 126

    Read more...

    Day 124

    Swagger API documentation

    Tutorial;

    Read more...

    Day 123



Subscribe