This is a collection of recent tech tips, which I decided to share. The equivalent of eatmydata on Fedora is nosync . Use at your own risk, but it should be relatively harmless in docker/etc. containers. One can change the widths of the fields (subject, date, size, etc.) in claws-mail by editing ~/.claws-mail/clawsrc . One can run kvm from the command-line using “qemu-kvm -m 4G -smp 1 -cdrom…
I need all your loves! Please 'Like', 'share' and [if you have something to add] reply. I have loved/knew many of you, but was too selfless. Reference: https://www.shlomifish.org/philosophy/culture/multiverse-cosmology/#see-also Moreover, note that if Christina Grimmie contacts me somehow, then I am willing to offer her both up to 50 % of the cash in my bank account, and an offer to chat with me /…
This is a collection of recent tech tips, which I decided to share. The default CMAKE_BUILD_TYPE in neovim's wrapper makefile is Debug which generates slower code than Release . So make sure you use a command similar to this one to build it: make CMAKE_BUILD_TYPE=Release CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH=$HOME/apps/neovim" . It may be a testament to neovim's efficiency that I found…
These are several tech tips I accumulated. Tip: Releasing / Uncapturing the keyboard input focus when using a KVM / virt-manager VM In order to release the keyboard input focus when using KVM (Kernel-based Virtual Machine) and virt-manager one can press "left control" and "left alt" together (not "left shift"). This was described in this post from StackExchange, where it shows how to set it to a…
Warning! The instructions given here may decrease your systems' security and may make it more vulnerable. Use at your own risk. I recently wanted to set up a remote X.org / X11 connection to a Xephyr server, which is an X server that runs inside a window. I only found partial information in web searches, so I wanted to provide a top-to-bottom guide for accomplishing this task. The Xephyr man page…
One can implement assert() in PARI-GP , a GPLed computer algebra system, using the error() function: assert(cond,err)=if(!cond,error(err)) myfunc()=4 assert(myfunc()==5,"myfunc should return 5") Licence Copyright by Shlomi Fish, 2020. You can reuse this entry under the Creative Commons Attribution 4.0 Unported licence, or at your option any later version of it. See the instructions on how to…
In order to permanently set the audio output of the VLC media player to "Mono" by default, edit ~/.config/vlc/vlcrc (or the equivalent) and set the [core] → stereo-mode line to stereo-mode=7 . Why 7? Because! Thanks to #videolan on Freenode for the tip. Note that the “Audio” menu setting does not persist by design. Cheers! Licence Copyright by Shlomi Fish, 2019. You can reuse this entry under the…
If you get an error TS2307: Cannot find module 'web-fc-solve'. error , try prefixing a "./" to the import name. See "typescript - How do you produce a .d.ts "typings" definition file from an existing JavaScript library? - Stack Overflow" question and especially the tip about using dts-gen . Don't compile more than one module into an amd . Convert your JS dependenciess to TypeScript bottom up.…
Kate is a text editor that I sometimes prefer to use. Normally, saying kate [optional file path here] from the command line opens a new buffer as a new tab in an existing window. However, one can instruct it to open in a new window using the -n command line flag. Cheers! Licence Copyright by Shlomi Fish, 2018. You can reuse this entry under the Creative Commons Attribution 4.0 Unported licence, or…
One can use the following command-line to start a new tmux session with a different hotkey than the default one (e.g.: for use as a nested session after su/sudo or in a nested ssh session, so both sessions can be controlled): tmux new-session \; set-option prefix C-a Replace "C-a" with the hotkey of your choice. Licence Copyright by Shlomi Fish, 2018. You can reuse this entry under the Creative…
TL;DR The main take-away from this essay is that I cannot in good conscience recommend against writing your own custom/ad-hoc/home-grown static site generator ("SSG") based on some lower-level tools, rather than going through the trouble of learning an existing open source one. Feel free to publish your own creation as open source as well, but you should anticipate that it is most probably not…
Cython allows one to compile code written using a superset of the Python programming language into C code for improved performance. I recently tried it in an attempt to speed up my solution to a Project Euler problem , which was ran slowly, even by pypy . After some amount of work, the cython-based solution outperformed the pure-Python code, without me having to reimplement it all in C or C++ or…
This is a essay that aims to be a correction to what Paul Graham wrote : Email was not designed to be used the way we use it now. Email is not a messaging protocol. It's a todo list. Or rather, my inbox is a todo list, and email is the way things get onto it. But it is a disastrously bad todo list. I'm open to different types of solutions to this problem, but I suspect that tweaking the inbox is…
By default, AWS' EC2 machines are given a hard disk of only 8 GB of space, and each extra gigabyte costs extra, even if you rent a machine with much more RAM than that. Some options you can try if you don't want to enlarge the hard disk are: Remove unnecessary system packages (using the “apt remove” command on Ubuntu/Debian VMs or equivalents. From my experience, the default Ubuntu VMs ship with a…
Pidgin is an open source chat client. If you want to make its incoming messages system tray icon animated, simply right click on the icon, and select “Blink on new messages”. This way it will be harder to miss and that is what I was used to having. Licence Copyright by Shlomi Fish, 2016. You can reuse this entry under the Creative Commons Attribution 3.0 Unported licence, or at your option any…
If you have a branch in a remote repository of the Git version control system which you need to reset/nullify/override its history, you can do it by setting up a brand new branch with the same name (say starting in an empty repository) and then pushing it from there to the remote while specifying the --force flag. Thanks to the people from #git on Freenode for enlightening me. Licence Copyright by…
If your touchpad/trackpad (= the built-in mouse control found in some laptops) is a Synaptic one, then you can disable it on Linux systems by issuing the command synclient TouchpadOff=1 (you may need to install synclient first. I originally learned of it from this link on kde-apps.org. Licence Copyright by Shlomi Fish, 2016. You can reuse this entry under the Creative Commons Attribution 3.0…
If you are using Travis CI , you can check the latest build after a failed build by going to the “Build History” tab in your project’s main page (= https://travis-ci.org/shlomif/fc-solve or equivalent), and selecting the new commit. Licence Copyright by Shlomi Fish, 2016. You can reuse this entry under the Creative Commons Attribution 3.0 Unported licence, or at your option any later version of…
2015-12-03: Tech Tip: Speed up building perl 5 by not installing the man pages When building perl 5 from source , one can speed up the "make" and "make install" stages significantly by not installing the man pages. To do so, pass the options “-Dman1dir=none -Dman3dir=none” to “sh Configure”. Cheers, and happy upcoming Chanukkah , and happy Christmas and/or Yulth or whatever winter holiday you…
When pressing «Ctrl+B;"» in tmux to split a pane vertically there, one will notice that tmux splits the existing pane into two which can result in smaller and smaller panes. In order to fix this, one can type «Ctrl+B;M-2» (where “M” is the Meta key and is normally “Alt” on most keyboards.) which will make all the panes equally heighted. I found this feature after wondering whether it existed, and…
A constant annoyance when trying to use the Firefox extension “ Personas Rotator ” was that downloading the favourites file from the Firefox addons site failed, which made it stop rotating. I recently found a solution for that which I'd like to share. First of all, login to the Mozilla addons site and access and bookmark the JSON data file’s URL . Save it to a file and host it using a local HTTP…
In order to build GNU Guile (or at least its version 2.x), it is important not to pass the “-j$N” flag to “make”. Without the flag, the compilation will be faster (counterintuitively I admit), because some of the build tasks spawn as many processes or threads as the CPU cores on the machine, and with the flag, they get congested and the build is slower. Cheers! Licence Copyright by Shlomi Fish,…
minicpan is a tool to create or update a minimal local mirror of CPAN (= the “Comprehensive Perl Archive Network”), that contains only the latest releases of CPAN distributions. Now, one problem I ran into when using it is that “minicpan” did not seem to delete the older downloaded releases after they were superseded by newer ones. A few days ago I found a solution to this problem. What you can do…
Let’s suppose you are packaging a software application using RPM or a similar packaging system, and this application contains some automated tests that can be run using “make test”, “make check” or similar. You may opt to put them inside a “%check” section, but the problem now is that they may fail. The solution I used in this case (assuming fixing the tests was out of scope of my work as a…
In order to debug Mozilla Firefox’s User Interface code (so-called “chrome” code), you should toggle the “Enable chrome and add-on debugging” checkbox in the Developer Toolbar’s setting and then go to “Tools → Web Developer → Browser Toolbox”. Thanks to jdm on irc.mozilla.org for part of this tip. Cheers and happy United Stated Independence Day (4th of July) in case you are an American. Licence…