Skip to content

Instantly share code, notes, and snippets.

View jarkkojs's full-sized avatar

Jarkko Sakkinen jarkkojs

View GitHub Profile
#!/usr/bin/env sh
# Copyright (c) 2024 Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
# An idiomatic way to install a U-he plugin with only CLAP and VST plugins.
PKG=$1
PKG_XML="temp-$PKG.xml"
installer \
-showChoiceChangesXML -pkg $PKG -target / | \
xmlstarlet edit --update "//array//dict[string[contains(text(), '.au')]]//integer" --value 0 | \
#!/usr/bin/env bash
# Copyright (c) Jarkko Sakkinen 2024
set -e
usage() {
>&2 cat << EOF
usage: `basename $0` [-bhp]
-b <wayland|x11> select the rendering backend
-h usage information
-p <prefix> select the installation prefix (defaults to '/usr/local')
EOF
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_KERNEL_XZ=y
# CONFIG_CROSS_MEMORY_ATTACH is not set
# CONFIG_PREEMPT_DYNAMIC is not set
# CONFIG_INITRAMFS_PRESERVE_MTIME is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EXPERT=y
# CONFIG_MULTIUSER is not set
# CONFIG_SGETMASK_SYSCALL is not set
# CONFIG_SYSFS_SYSCALL is not set
set history filename ~/.gdb_history
set history save on
set logging enabled on
set logging file ~/.gdb_log
set pagination off
define step_program
starti
while (1)
stepi
❯ lscpu --all --extended
CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ MINMHZ MHZ
0 0 0 0 0:0:0:0 yes 5500.0000 800.0000 2128.6550
1 0 0 0 0:0:0:0 yes 5500.0000 800.0000 800.0000
2 0 0 1 4:4:1:0 yes 5500.0000 800.0000 5500.0000
3 0 0 1 4:4:1:0 yes 5500.0000 800.0000 800.0000
4 0 0 2 8:8:2:0 yes 5500.0000 800.0000 800.0000
5 0 0 2 8:8:2:0 yes 5500.0000 800.0000 800.0000
6 0 0 3 12:12:3:0 yes 5500.0000 800.0000 800.0000
7 0 0 3 12:12:3:0 yes 5500.0000 800.0000 800.0000
# python3
Python 3.10.6 (main, Jul 28 2023, 17:53:04) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
# ./run_kselftest.sh
[ 43.937979] kselftest: Running tests in tpm2
TAP version 13
1..2
# selftests: tpm2: test_smoke.sh
# test_read_partial_overwrite (tpm2_tests.SmokeTest) ... ok
macro(bin2elf Path Name)
set(objcopy_flags -I binary -O elf64-littleriscv -B riscv --rename-section .data=.rodata,alloc,load,readonly,data,contents)
string(MAKE_C_IDENTIFIER ${Path} unstripped)
add_custom_command(
OUTPUT ${Path}.o
COMMAND ${CMAKE_OBJCOPY} ${objcopy_flags} ${Path} ${Path}.o
COMMAND ${CMAKE_OBJCOPY} --redefine-sym _binary_${unstripped}_start=${Name}_start ${Path}.o
COMMAND ${CMAKE_OBJCOPY} --redefine-sym _binary_${unstripped}_end=${Name}_end ${Path}.o
COMMAND ${CMAKE_OBJCOPY} --redefine-sym _binary_${unstripped}_size=${Name}_size ${Path}.o
)
# mount -t tracefs nodev /sys/kernel/tracing
# cat /sys/kernel/tracing/trace
# tracer: function
#
# entries-in-buffer/entries-written: 6/6 #P:1
#
# _-----=> irqs-off/BH-disabled
# / _----=> need-resched
# | / _---=> hardirq/softirq
# || / _--=> preempt-depth
#!/usr/bin/env bash
URL=https://keystone-enclave.eecs.berkeley.edu/files
echo $URL/riscv-{musl-,}toolchain-lp64d-rv64gc-2021.01.bionic.7z | \
xargs -n1 | \
xargs curl -sSL | \
tar zxv -i
-- Copyright (C) 2023 Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
vim.cmd("filetype plugin indent on")
vim.cmd [[packadd packer.nvim]]
local function plugins(use)
use 'wbthomason/packer.nvim'
use 'ap/vim-buftabline'
use {
'nvim-lualine/lualine.nvim',
requires = { 'kyazdani42/nvim-web-devicons', opt = true }