- Host OS: Linux
- Program: virt-manager
- Intel Virtualization Technology (to enable OpenGL for good framerate)
- Enable Intel Virtualization Technology in the BIOS.
- Add
intel_iommu=on iommu=pt
to your kernel parameters (of the host OS).
use core::mem::size_of; | |
pub trait ParseHex: Sized { | |
fn parse_hex(input: &str) -> (&'_ str, Self); | |
} | |
macro_rules! impl_parse_hex { | |
($($num:ident)*) => {$( | |
impl<const LEN: usize> ParseHex for [$num; LEN] { | |
fn parse_hex(input: &str) -> (&str, Self) { |
com.google.android.gms.supervision | |
com.microsoft.skydrive | |
com.samsung.android.game.gametools | |
com.samsung.android.game.gos | |
com.samsung.android.knox.zt.framework | |
com.samsung.android.peripheral.framework | |
com.samsung.cmfa.AuthTouch | |
com.sec.android.app.samsungapps | |
com.sec.spp.push # <-- this is the annoying notifications that "recommended" apps to have |
#!/bin/bash | |
set -o errexit -o pipefail -o nounset | |
echo 'Consuming RAM. Press Ctrl-C to stop.' >&2 | |
while true; do | |
echo {0..8388608} >/dev/null | |
done |
Here is the link to the git repository in case you desire none of my ramblings: https://github.com/KSXGitHub/parallel-disk-usage.
In the past few months, I have always used dust
to visualize disk usages of heavy directories. It displays an intuitive bottom-up tree from heavier items to lighter ones. Every item is attached with a percentage bar that allow me to compare the relative size 2 sibling items as well as their parent. I quite like it.
I would soon discover its limits however.
import { createReadStream } from 'fs' | |
import { createInterface } from 'readline' | |
const READ_STREAM_OPTIONS = { encoding: 'utf8' } as const | |
export function firstLine (filename: string) { | |
const stream = createReadStream(filename, READ_STREAM_OPTIONS) | |
const reader = createInterface(stream) | |
let result: string | |
reader.once('line', line => { |
#! /usr/bin/env zsh | |
script=https://ksxgithub.github.io/my-deno-scripts/cmd/insert-object-key.ts | |
deno fetch $script | |
run=(deno run $script) | |
insert=($run --before dependencies) | |
args-to-list packages/*/package.json | while read filename; do | |
echo '>>>' $filename | |
< $filename | | |
$insert browser '"index.mjs"' | | |
$insert module '"index.mjs"' | |
import xs from 'xstream' | |
import spawn from 'advanced-spawn-async' | |
import { Option, Some, some, none, match } from '@tsfun/option' | |
export enum Status { | |
Plugged = 'Plugged', | |
Unplugged = 'Unplugged' | |
} | |
type UnknownStatus = Status | 'Unknown' |