Skip to content

Instantly share code, notes, and snippets.

View Muku784's full-sized avatar

Eduard Muku784

  • Cyberdyne Systems
View GitHub Profile
@Muku784
Muku784 / lotto.java
Created January 23, 2023 02:11
Lotto 4 digits
// hi rainbows!
import java.util.Random;
public class lotto {
private final int[] array;
public lotto() {
Random rand = new Random();
import java.util.*;
public class test {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in); // Create a Scanner object
int number = scanner.nextInt(); // Read user input
int[] digits = getDigits(number); // Get the digits of the number
System.out.println(Arrays.toString(digits)); // Print the digits
} // End of main
@Muku784
Muku784 / how-to-upgrade-nvmw-ssd-firmware-on-linux.md
Created April 1, 2022 19:20 — forked from klingtnet/how-to-upgrade-nvmw-ssd-firmware-on-linux.md
How to upgrade [Lenovo] NVMe SSD firmware on Linux

The instructions were tested on a Lenovo X1 Carbon 5th Gen (X1C5) on Arch Linux but should be applicable to other Lenovo models and Linux distributions.

BACKUP YOUR DATA! I created a bootable Ubuntu Image like this:

$ sudo sh -c 'curl --location --silent --fail "http://releases.ubuntu.com/18.04/ubuntu-18.04.1-desktop-amd64.iso" | pv > /dev/<your-usb-drive>'
# note that pv is only there to show progress, it is perfectly fine to redirect curl to the usb drive directly.

then I booted from this drive by pressing F12 on reboot and dumped my NVMe disk to an external hard drive like this: