A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
ABX test of audio files
abx original.wav lossy.wav
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'; |
#!/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" | |
} |
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 |
/efi
dir so that systemd-gpt-auto-generator
can automount ESPbootctl
to install/update bootloader in ESPkernel-install
to 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
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 -> { |
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)); |