Better HN
topnewbestaskshowjobs
Log inSign up

mihaigalos

182 karma · joined Feb 14, 2020 (6y ago) · 113 submissions

Submissions

comment 1y ago · link · parent

Excellent article. Cimbar codes can encode glyphs yielding about 10 kB/qrcode, stackable. Ref: https://github.com/sz3/cimbar

comment 1y ago · link · parent

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).

comment 2y ago · link · parent

In TDD, u-tests are called "spec". Pretty much sums it up.

comment 2y ago · link · parent

I self-host paper-hn in a k3s cluster. Homepage here: https://github.com/wolfgang42/paper-hn

comment 2y ago · link · parent

Nice tool. Also relevant: https://github.com/dandavison/delta

comment 2y ago · link · parent

If you're fine with plain http on your local network, you can use https://github.com/mihaigalos/aim

Spoiler: I wrote it.

comment 2y ago · link · parent

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

comment 2y ago · link · parent

Because there is a Yubico server involved in the auth process. No internet access means you cannot authenticate.

comment 2y ago · link · parent

Sidenote: This requires internet access. I'm considering selfhosting a Yubikey auth server and disabling ssh on it.

comment 2y ago · link · parent

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

comment 3y ago · link · parent

Amazing. Congrats.

comment 3y ago · link · parent

I've used Swig to inherit from base classes in Java to implementations in C++. Swig generated the JNI and C++ bindings.

Fun times.

comment 3y ago · link · parent

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."

comment 3y ago · link · parent

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!

comment 3y ago · link · parent

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? ..

comment 3y ago · link · parent

You could use blink(1) [1] and write some Bash/Python glue to query HN and drive it.

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

comment 3y ago · link · parent

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...

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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/...

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

Thanks for this. Related: https://tmate.io/

comment 3y ago · link · parent

What is the exact Q you're asking? I'm genuinely interested.

comment 3y ago · link · parent

Nice work! I've written something similar based on regexes:

https://github.com/mihaigalos/pipeview

comment 3y ago · link · parent

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/

comment 3y ago · link · parent

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

comment 3y ago · link · parent

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

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

This is blackmagic. Nice work!

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

1234