HNHacker News
TopNewBestAskShowJobs

mihaigalos

182 karma · joined February 14, 2020

submissionscomments
mihaigalos··on How to Store Data on Paper?
Excellent article. Cimbar codes can encode glyphs yielding about 10 kB/qrcode, stackable. Ref: https://github.com/sz3/cimbar
mihaigalos··on Micro keypad to do your regular Git push/pull/add/commit actions
I'm using this in my .zshrc:

  function cd { builtin cd "$@" && [ -d .git ] && git pull || true; exa -all --group-directories-first; }

  alias acp='git add -u &&-c "git log --color --pretty=format:\"%s\" --abbrev-commit -- |>/tmp/git_log_sk && git commit --gpg-sign --edit -F /tmp/git_log_sk && rm /tmp/git_log_sk" && git push -u
 origin HEAD'
The cd automatically pulls if it's a git repo. The acp is shorthand for "add+commit+push" with sk as a fuzzy finder for a commit message editing (vim integrations).
mihaigalos··on Unit tests as documentation
In TDD, u-tests are called "spec". Pretty much sums it up.
mihaigalos··on Getting my daily news from a dot matrix printer
I self-host paper-hn in a k3s cluster. Homepage here: https://github.com/wolfgang42/paper-hn
mihaigalos··on Difftastic, a structural diff tool that understands syntax
Nice tool. Also relevant: https://github.com/dandavison/delta
mihaigalos··on How to copy a file between devices? (2022)
If you're fine with plain http on your local network, you can use https://github.com/mihaigalos/aim

Spoiler: I wrote it.

mihaigalos··on Sudo without a setuid binary or SSH over a Unix socket
This is awesome, thanks. But would still like to keep the auth server separate to minimize the attack surface something like the now deprecated [1].

[1] https://github.com/scumjr/yubikeyedup

mihaigalos··on Sudo without a setuid binary or SSH over a Unix socket
Because there is a Yubico server involved in the auth process. No internet access means you cannot authenticate.
mihaigalos··on Sudo without a setuid binary or SSH over a Unix socket
Sidenote: This requires internet access. I'm considering selfhosting a Yubikey auth server and disabling ssh on it.
mihaigalos··on Sudo without a setuid binary or SSH over a Unix socket
I'm using a Yubikey for both sudo and ssh 2FA:

# /etc/pam.d/sudo

    auth      optional  pam_faildelay.so delay=5000000
    auth      [success=1 default=ignore] pam_yubico.so authfile=/home/user/auth_file id=16 
    session   required  pam_env.so readenv=1 user_readenv=0
    session   required  pam_env.so readenv=1 envfile=/etc/default/locale user_readenv=0
    @include  common-auth
    @include  common-account
    @include  common-session-noninteractive
# /etc/pam.d/sshd

    auth     optional   pam_faildelay.so delay=5000000
    auth     requisite  pam_yubico.so authfile=/home/user/auth_file id=16 debug
    account  include    base-account
    auth     required   pam_env.so
    auth     required   pam_nologin.so successok
mihaigalos··on Linux on an 8bit Microcontroller (2012)
Amazing. Congrats.
mihaigalos··on Swig – Connect C/C++ programs with high-level programming languages
I've used Swig to inherit from base classes in Java to implementations in C++. Swig generated the JNI and C++ bindings.

Fun times.

mihaigalos··on Remote work brings hidden penalty for young professionals, study says
At this point, I wouldn't be surprised if it comes to light that such research is funded by hedge funds owning the commercial real estate you "absolutely have to have for the poor young professionals."
mihaigalos··on ChatGPT-Linux-Assistant
I am surprised the OP deleted their repo after the backlash here and potentially elsewhere. The messages seemed to say "do not execute arbitrary code coming from ChatGPT".

That's fine.

The scope of it, the way I understood it, was for educational purposes. To that extent, a simple disclaimer "Only run this in a sanbox you can afford to lose or throw away" would have been sufficient.

OP, nice work anyway!

mihaigalos··on Google's Go may add telemetry that's on by default
And in the next iteration, Go has telemetry on by default, with no flag to disable it.

Because you know, they can. And what can you do when your stack is already written in Golang? ..

mihaigalos··on Ask HN: Who wants a LED that blinks every time a new HN article is posted?
You could use blink(1) [1] and write some Bash/Python glue to query HN and drive it.

[1] https://blink1.thingm.com

mihaigalos··on Department of Defense: Software Is Never Done (2019) [pdf]
I feel Scrum has evolved into something contradicting the original Agile practices.

These were more of a template on how to develop, not a concrete recipe. Scrum then established a process where there was need for a family of processes, continuously evolving, ever changing.

The very fact that "you absolutely have to have a specific ceremony (i.e.: Retro when no topics)" is a red flag which imho puts the cart before the horse.

Why is there a "Scrum Master" anyway, if individuals are encouraged to interact and own the process? Suppose an individual wants to change the process, and reaches consensus within the team/community. Why would a Scrum Master / Manager even be able to veto any decision?

Why is there a Sprint when SW development is actually a marathon? Uncle Bob talks about this in several of his Clean Methodology books.

I don't think that Agile is dead [1], although it has been taken over by people eager to sell you a *cough* certification (Scrum or any other). It's not dead because its genius is that it's constantly evolving, and you can always interpret it differently since it's only a template. Scrum, on the other hand.. well..

For the future, I look forward to not putting an equal sign between Scrum and Agile, even though apparently Scrum is how you "do" Agile, according to the industry.

[1] https://www.simplethread.com/agile-at-20-the-failed-rebellio...

mihaigalos··on Wasavi – Vi editor for any webpage
I can confirm this. However, I constantly get a "View saved logins" to the top of the input field after I start typing.

Did you experience the same? I'm on Firefox 108.0.2.

mihaigalos··on Ask HN: How do you trust that your personal machine is not compromised?
Also, I have a Google Authenticator as a fall-back in case the 1st Yubikey PAM fails or I have no access to the internet to contact the Yubico servers for token validation.

Perhaps somebody can confirm if it's a good idea or not, but I like to generate only 1 emergency code for Authenticator (the least) and then delete that line in ~/.google-authenticator. Also, permissions of 400.

In case interested, check it out in code here: https://github.com/mihaigalos/config/blob/main/services/pam/...

mihaigalos··on Ask HN: How do you trust that your personal machine is not compromised?
I've taken steps to secure my Linux:

* Using Yubikey PAM always as a 2FA for ssh,sudo (also on every Linux in my home network).

* Always require authentication on each sudo command (prevents escalating once and then reusing privileges).

* Only running Docker with sudo as recommended (requires 2FA now).

* Closing all traffic other than services I need with nftables.

Regularly look at the journalctl for suspicious activity.

mihaigalos··on Show HN: Quick tunnels to localhost with one command and no binary download
Thanks for this. Related: https://tmate.io/
mihaigalos··on Theory-building and why employee churn is lethal to software companies
What is the exact Q you're asking? I'm genuinely interested.
mihaigalos··on Lnav – An advanced log file viewer for the small-scale
Nice work! I've written something similar based on regexes:

https://github.com/mihaigalos/pipeview

mihaigalos··on Adding design-by-contract conditions to C++ via a GCC plugin
The contracts crate [1] supports this via macros.

I actually prefer the invariant section above the definition, but do admit the pre and post in C++ look better.

[1] https://docs.rs/contracts/latest/contracts/

mihaigalos··on My Age+Yubikeys Password Management Solution
I wrote a similar wrapper around Rage+Yubikeys called pass [1], even before I knew passage existed. The fzf integration in your page is beautiful, I'll implement it in pass next.

[1] https://github.com/mihaigalos/pass

mihaigalos··on Show HN: Portable Secret – How I store my secrets and communicate privately
Age is amazing. I'm using a Yubikey in conjunction with it to encrypt {passwords, docs} and commit them to a private GitHub repo.

See here if interested: https://github.com/mihaigalos/pass

mihaigalos··on Top Five (Wrong) Reasons You Don’t Have Testers
Wouldn't a modern approach to testing be more appropriate? I'm thinking about BDD with stakeholders, TDD during implementation.

This ensures a high coverage and corner cases are addressed.

mihaigalos··on Fe: next generation smart contract language for Ethereum
Smart contracts written i.e. for Ethereum use Solidity, which is not Turing complete. By restricting semantics you have finer control over potential slippages.

Besides, a language for smart contracts that is built around the domain is easier to work with than a general-purpose one. So your Q would then be: why not something like Solidity or similar? - perhaps somebody else can elaborate.

mihaigalos··on Show HN: Using Vim as an input method editor (IME) for X11 apps
This is blackmagic. Nice work!

Q: Why not publish it to crates.io (cargo publish)?

mihaigalos··on Julius: An open source re-implementation of Caesar III
Have my upvote, you made my day!
Page 1 of 4Next →