- Create
/efidir so thatsystemd-gpt-auto-generatorcan automount ESP - Use
bootctlto install/update bootloader in ESP - User
kernel-installto copy linux image and initrd into ESP, e.g.kernel-install add 4.19.0-0.bpo.5-amd64 /boot/vmlinuz-4.19.0-0.bpo.5-amd64
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private Optional<TemplateRule> findBestTemplateRule(List<TemplateRule> list) { | |
| Predicate<TemplateRule> byClientId = r -> Objects.equals(r.getClientId(), shipment.getClientId()); | |
| Predicate<TemplateRule> byLastMile = r -> r.getLastMile() == shipment.getLastMileEnum(); | |
| Predicate<TemplateRule> byFirstMile = r -> r.getFirstMile() == shipment.getFirstMileEnum(); | |
| Predicate<TemplateRule> byFirstMileAndLastMile = byFirstMile.and(byLastMile); | |
| Stream<TemplateRule> one = list.stream().filter(byFirstMileAndLastMile.and(byClientId)); | |
| Stream<TemplateRule> two = list.stream().filter(byFirstMile.and(byClientId)); | |
| Stream<TemplateRule> three = list.stream().filter(byLastMile.and(byClientId)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.demo; | |
| import java.util.Optional; | |
| import java.util.function.Function; | |
| import java.util.function.UnaryOperator; | |
| public class LogOptional { | |
| public static void main(String[] args) { | |
| UnaryOperator<?> log = x -> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo -i | |
| mount -o remount,rw /cdrom | |
| truncate -s $((4*2**30-1)) /cdrom/casper-rw | |
| mkfs.ext4 -L casper-rw -O ^has_journal /cdrom/casper-rw | |
| sed -i '/casper\/vmlinuz/ s/ ---/ persistent\0/' /cdrom/boot/grub/grub.cfg | |
| reboot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh -eu | |
| # Downloads, verifies and unpacks Ubuntu mini.iso fixing lack of UEFI support | |
| # See https://bugs.launchpad.net/ubuntu/+source/debian-installer/+bug/1429030 | |
| # Thanks to https://www.nemotos.net/?p=2057 | |
| require() { | |
| hash "$@" || die "Some of the required commands are missing" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function randomQuote() { | |
| const quotes = await fetch('http://quotes.cat-v.org/programming/') | |
| .then(response => response.text()) | |
| .then(html => new DOMParser().parseFromString(html, 'text/html')) | |
| .then(dom => [...dom.querySelector('body > article').children]) | |
| quotes.shift(); | |
| const isSeparator = el => el.tagName === 'HR'; |