Skip to content

Instantly share code, notes, and snippets.

@squeuei
squeuei / SN520.md
Last active December 4, 2020 12:11
How to buy a SN520 M.2 2242 NVMe SSD

When you lost Windows Boot Manager from EFI partition

Sometimes you break your Windows Boot Manager when you set your PC to a dualboot configuration.

In some case, start-up Repair won't help you because files in EFI partition are missing.

If the Windows system partition is untouched, you can copy EFI files from the partition.

Boot with Windows 10 installation media. Choose Repair your computer. Start command prompt.

Stop error about nouveau and start using Intel iGPU only on Fedora (and it also applies to Debian/GNU Linux)

I'm using a Thinkpad T480 with GeForce MX150 dGPU option.

After the installation, Fedora 32 raises an error notification about nouveau on every boot up.

To get rid of this, you have two choices. You can install official proprietary driver for NVIDIA GeForce GPU. The other option is disabling GeForce dGPU at all.

You can blacklist nouveau to do that.

@squeuei
squeuei / lichee-nano-fel.md
Last active October 14, 2023 20:58
How to enter FEL mode on Lichee nano

How to enter FEL mode on Lichee nano

If SPI flash isn't on the board, just remove the TF(microSD) card from the board and supply the power. It's the same if SPI flash is empty,

If your board have a SPI flash with preloaded image, pull D4(SPI CLK) down to GND. You can use the metal part of USB micro B or TF card slot as GND. Diagram is in the comment below. Thanks: @ernestp for the correction and providing a diagram.

Or you can use the special boot image [link]. Just write it to a TF card and boot.

Don't forget to remove the GND connection after entering FEL mode otherwise you will never be able to write the boot image to the SPI flash.

@squeuei
squeuei / texlive-on-win10-2018-october-update.md
Last active April 28, 2019 15:07
TeXLive 2018 on Windows 10 2018 October Update

TeXLive 2018 on Windows 10 2018 October Update

TL;DR

If you can't compile your TeX document because of font not found, you should install your user fonts System Wide by right-clicking the font files and selecting Install for all users.

Explanation

From Windows 10 2018 October Update (1809), font files will be installed to %USERPROFILE%/AppData/Local/Microsoft/Windows/Fonts even if you copied your fonts to C:\Windows\fonts on Explorer.

@squeuei
squeuei / postscript_core_font_set.md
Last active January 28, 2024 15:37
Open Source/TypeKit/Bitstream Alternative to Postscript Core Font Set
PostScript Core Font URW Core35 TeX Gyre Liberation croscore TypeKit Bitstream
Helvetica Nimbus Sans TeX Gyre Heros Liberation Sans Arimo Nimbus Sans Swiss 721
Helvetica Condensed Liberation Sans Narrow Nimbus Sans Condensed Swiss 721
Times Nimbus Roman TeX Gyre Termes Liberation Serif Tinos Nimbus Roman Dutch 801
Courier Nimbus Mono TeX Gyre Cursor Liberation Mono Cousine Courier

| PostScript2 Core Font | URW Core35 | TeX Gyre | Liberation | croscore | TypeKit | Bitstream | |-------------------------|--------------|-------------------|------------------------|--------

@squeuei
squeuei / graphics_library.md
Last active March 14, 2019 11:39
OCaml `Graphics` library and opam switch

Problem

For example, you installed OCaml 4.x.x compiler/environment via opam switch and tried to install graphics.

opam switch 4.x.x
# `opam switch create 4.x.x` if opam 2.0.0
eval `opam config env`
opam install graphics

You might encounter some errors like this.

@squeuei
squeuei / fedora28_opam.md
Created June 2, 2018 22:51
Fedora 28 and opam

If you installed opam on Fedora 28, you might be surprised the fact that you can't do opam switch 4.0x.x.

On Fedora 28, sudo dnf install opam installs opam 2.0 beta (as of 2018-06-02).

Official Blog says that there are some changes to be aware of, including:

opam switch create is now needed to create new switches

Therefore, what you want to do should be like this:

@squeuei
squeuei / howto.md
Last active May 12, 2018 20:47
How to enable touchscreen scrolling in Firefox

How to enable touchscreen scrolling in Firefox

Instructions

On Debian (As of 2018-05-11, Firefox 60/52ESR, Debian sid):

Add a line to .xsessionrc:

export MOZ_USE_XINPUT2=1