Script to launch a few tmux tabs
#!/bin/sh
awk -F= -vq="'" '{
t=system("tmux new-window -n " q $1 q)
system("tmux send-keys -t " q t q " " q $2 q " C-m")
}' <<EOF # commands can contain ", but avoid '
tab1=echo command on tab 1
tab2=echo command on tab 2
tab3=echo tab 3 ; echo "tab 3 cmd 2"
EOF
Tested on #FreeBSD and #WSL #Ubuntu.distfp reshared this.
Advent of Code 2022
At first, I didn't really understand all the buzz about #AdventOfCode but then I decided to use it as an excuse to (finally?) explore languages I didn't try yet, and thus I decided to do each day in a new language.
Day 1 I did in #Awk, a simple scripting language which is very nice at managing text streams.
Day 2 was #JavaScript and day 3 #Java, this is definitely my comfort zone.
Day 3 was #Python, a language whose syntax I utterly dislike, but it was quite easy to solve.
For day 4 I tried #RustLang, this was so difficult (so much new stuff to learn) but I'm happy enough with the result! (or at least, it looks nice enough to me, not knowing much about the language)
For day 5 I finally used #Scala, a functional language I would like to use and love… but my result is probably THE WORST I did on this adventure so far… I really dislike all those "list updates" (I tried with ArraySeq and other approaches, but to no avail), and I have the feeling that a proper Scala solution could be written in half the lines or even less.
Day 6 I did in #GoLang and while I don't realyl dig the syntax, it was easy enough to write.
… but the one I'm most proud of is day 7 in #LISP, which took an amount of time I'm not proud of (most of today's free hours with the constant feeling that "20 more minutes and I'm done"), but I'm quite happy with the result!
GitHub - lapo-luchini/advent: My Advent of Code solutions
My Advent of Code solutions. Contribute to lapo-luchini/advent development by creating an account on GitHub.GitHub
Greg A. Woods likes this.
reshared this
https://twitter.com/lukhash/status/1602729716246581251
Loading C64 game directly from glow-in-the-dark vinyl record. The noise is binary audio, computer processes the data fed from the vinyl and the game is loading in real-time. We also created an online scoreboard. Shit can’t get any cooler 🔥Twitter
retrogaming_bot reshared this.
Penrose tilings
The infinite nature of Penrose tilings never fails to blow my mind a little bit more, each and every time.
This tiling generator (as advertised in the video) is such a beauty.
aatishb.com/patterncollider/
Browser JavaScript properties order
You know the proper property order.
It has even been (recently) standardized.
You even print it correctly in the short preview.
Why ruining it all in the long detailed version?
Maybe the object has hundreds of properties and
the user might prefer them sorted, granted.
But please give us choice regarding that.
Add a tiny small icon to change the order,
just like Chrome does to warn the values
might have changed in the meantime.
#Firefox #Chrome #JavaScript #JSON #ES2020
#numberTheory is strange.
jsfiddle.net/lapo/kue9toph/
blog.cryptographyengineering.c…
"the fuck do you want?" emoticon incoming
I'm halfway thru the chapters and loving #Eliza so far!
zachtronics.com/eliza/
(originally group id was generated sequentially during import)
github.com/lapo-luchini/tgsqli…
NERV Cannarsi-style
Dopo la lettura dell'articolo di Doc Manhattan sul nuovo adattamento di #Evangelion curato da Cannarsi io e Mauro e Mattia non potevamo esimerci dal produrre quest'immagine.
(English brief: Evangelion was re-dubbed in Italian, and it's so bad)
How does Apple (privately) find your offline devices?
How is this system going to avoid being a massive privacy nightmare?
The good news is that Apple claims that their system actually does provide strong privacy, and that it accomplishes this using clever cryptography. But as is typical, they’ve declined to give out the details how they’re going to do it. […] an incomplete technical description that Apple provided to Wired […] provides many hints. Unfortunately, what Apple provided still leaves huge gaps. It’s into those gaps that I’m going to fill in my best guess for what Apple is actually doing.
#security #crypto #policy #backdoor #escrow
Creality Ender 3
I'm really amazing how good is a cheap printer (€217) nowadays, and how easy it was to set it up.
In the first concave prints I had lots of stringing, which I solved as suggested by CHEP.
So, yes, now I own a 118dB whistle and I don't even know why. :P
You can follow my experiments in this Google Photos album:
#3dprint #Creality #Ender3
Hearing passwords
We need to choose either #security or #surveillance.
Fuck surveillance.
Quoting a recent post from Bruce Schneier:
Either everyone gets to spy, or no one gets to spy. And I believe we must choose security over surveillance, and implement a defense-dominant strategy.
3×3RPGs
Please reshare and reply:
#3x3RPGs
#GplusRPG
3 most recent RPGs:
• Polaris
• Kagematsu
• Dogs in the Vineyard
3 favorite RPGs, ever:
• Monsterhearts
• Kagematsu
• Dogs in the Vineyard
3 most want-to-play RPGs:
• Monsterhearts
• Shock: social schience fiction
• Bliss Stage
T.I.E. by theam Thumos
tapas.io/series/tie
Electronic vote fail (in Switzerland)
Windows' windows position
Do you hate when Windows® happily decides the position of your windows isn't so important and scrambles them all around (e.g. after a resolution change, launching a full screen game, or attaching an extra monitor)?
Now you can use this, a public domain software I found on GitHub and improved to fix Win10 support some time ago.
Patrick Marchiodi
in reply to Lapo Luchini • •Lapo Luchini
in reply to Lapo Luchini • •Patrick Marchiodi
in reply to Lapo Luchini • •