Juan's Blog

My digital $HOME.

Conda sucks

Yeah, but I have to use it, and this articles explains how to auto activate Conda with direnv.

I know what you're thinking, but conda activate <environment> in .envrc doesn't work

TLDRAuto activate Conda with direnvSetup direnvConda zsh init scriptSet up in your project's .direnv

Read more...

Workaround for this GitHub problem

Read more...

An updated list of tips and tricks for running Alarm on RPI

Read more...

昨天做体检,医生说我血压偏低,虽然一时半会还挂不了,但是说要控制情绪,按时睡觉,定期复查。我想,暑假生活明明这么健康,哪来这么多问题?其实也不用多说,这一切的罪魁祸首肯定还是在学校。

我总感觉我的大学有点不对劲,就比如以做题为中心的教学安排,单一的价值取向,利己主义的氛围,次等的住宿环境和难吃的饭菜。在高中我总是喜欢憧憬大学生活,喜欢看讲西南联大的书,以为上了大学,我内心里被做题教育羁押的野兽终于可以获得自由(oh yeah)!现在国家大环境有点闭塞,但至少也不会多封闭,还是值得体验,对吧。

Read more...

There is an android app named Adaway, which automatically updates your system hosts file to redirect ads domain to localhost.

However, changing hosts file on linux can cause problems, because when you autocomplete shell commands like ssh and nmap, domains in hosts file will be pulled, which generates a lot of lag since there are way too many. One good way to work around this is to add blocklist in your dns server instead.

Since I don't see many info around the web that covers these setups, I decided to write it myself and explain the incentives along the way.

TLDR:

  • Unbound: the privacy-centric DNS server
  • Hblock: Ad blocking script

#linux #privacy #dns #censorship

Read more...

Update: On latest version of SwayWM, everything works OOTB with Fcitx5

To input CJK (Chinese, Japanese and Korean) languages in Linux Minecraft, you can install this mod CocoaInput.

If that's the case, I won't bother writing an article about it. The thing is that the mod is only officially available for 1.7 to 1.18, for the latest Minecraft 1.19 to 1.20, you'll need to compile the mod binary from an updated fork of it.

#linux #gnome #minecraft

Read more...

The one thing I missed most from SwayWM after my transition from SwayWM to GNOME, was the ability to change keyboard layout for each keyboard and mouse.

#linux #gnome #wayland

Read more...

Update: Just use flatpak version instead

steam needs two steps to properly identify a controller:

  • controller is visible to sdl2
  • controller's /dev/hidraw is visible to steam

#linux #gaming #systemd

Read more...

Read more...

I use steam in a arch linux chroot to avoid gentoo's x86 depencency hell, although ALSA inside the chroot works, it doesn't support advanced features like bluetooth, usb output and more.

In this article, I talk about how to configure pipewire in chroot to achieve features mentioned above.

#linux #gaming #pipewire #chroot

Read more...