Skip to content

Instantly share code, notes, and snippets.

@Borillion
Borillion / printer.cfg
Last active October 21, 2023 17:50
k1 max printer cfg
# K1-MAX
# Printer_size: 300x300x300
# Version: v1.0.22
# CreateDate: 2023/03/21
# Nozzle_mcu: chip: GD32F303CBT6
# version: K1-NOZZLE-M_V12
# Leveling_mcu: chip: GD32E230F8P6
# version: K1-MAX-L-V11
# mcu: chip: GD32F303RET6
# version: CR4CU220812S12
@Borillion
Borillion / bed_mesh_console.txt
Created October 18, 2023 05:54
K1 Max Bed Mesh
22:47:30
// Mesh Bed Leveling Complete
22:47:30
// Bed Mesh state has been saved to profile [default]
// for the current session. The SAVE_CONFIG command will
// update the printer config file and restart the printer.
22:47:30
// Mesh Leveling Probed Z positions:
// 0.423031 0.315594 0.195563 0.163281 0.167406 0.272668
// 0.459438 0.288886 0.177687 0.135437 0.137812 0.233844
@Borillion
Borillion / setup_virtualenv.py
Created July 28, 2023 05:41
This code creates a virtualenv environment in the directory specified by the -d or --env-dir command-line argument. If the directory does not exist, it will be created if the -c or --create option is used..
import os
import sys
import shutil
import subprocess
import argparse
# Set up command-line argument parser
parser = argparse.ArgumentParser(description='Set up a virtual environment.')
parser.add_argument('--env-dir', '-d', type=str, required=True,
help='Directory where the virtual environment should be set up.')

Kernel Wakesources:

Ranking Name Duration / Hr Count / Hr Total Duration Total Count
0 dumpstate_wakelock 28s742ms 0.00 2m57.722s 0
1 bluetooth_timer 27s547ms 119.52 2m50.334s 739
2 odm:btbcm 21s141ms 36.07 2m10.721s 223
3 14a50000.abox 20s227ms 39.78 2m5.071s 246
4 alarmtimer 16s316ms 8.09 1m40.887s 50
@Borillion
Borillion / wakes.markdown
Last active June 8, 2023 18:23
Pixel Watch Wakelocks and Wake reasons

Kernel Wakesources

Ranking Name Duration / Hr Count / Hr Total Duration Total Count
0 bluetooth_timer 27m20s191ms 3008.35 3h9m3.162s 20805
1 odm:btbcm 12m36s515ms 1984.16 1h27m11.88s 13722
2 14a50000.abox 5m12s793ms 607.89 36m3.204s 4204
3 alarmtimer 15s456ms 7.66 1m46.89s 53
4 dumpstate_wakelock 9s806ms 0.00 1m7.818s 0

Kernel Wakeup Reasons:

@Borillion
Borillion / tasks.json
Created March 26, 2023 04:18
vscode HelloWorld tasks.json
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++ build active file",
"command": "/usr/bin/g++",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
@Borillion
Borillion / launch.json
Created March 26, 2023 04:16
vscode HelloWorld launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(lldb) Launch",
[2021-12-06T10:34:00+0000] [PACMAN] Running 'pacman -r /mnt -Sy --cachedir=/mnt/var/cache/pacman/pkg --noconfirm base linux linux-firmware linux-headers linux-devel git vim nano'
[2021-12-06T10:34:00+0000] [PACMAN] synchronizing package lists
[2021-12-06T10:34:38+0000] [PACMAN] Running 'pacman -r /mnt -Sy --cachedir=/mnt/var/cache/pacman/pkg --noconfirm base linux linux-firmware linux-headers git vim nano'
[2021-12-06T10:34:38+0000] [PACMAN] synchronizing package lists
[2021-12-06T10:35:13+0000] [ALPM] transaction started
[2021-12-06T10:35:13+0000] [ALPM] installed iana-etc (20211025-1)
[2021-12-06T10:35:13+0000] [ALPM] installed filesystem (2021.11.11-1)
[2021-12-06T10:35:13+0000] [ALPM] installed linux-api-headers (5.12.3-1)
[2021-12-06T10:35:13+0000] [ALPM] installed tzdata (2021e-1)
[2021-12-06T10:35:13+0000] [ALPM] installed glibc (2.33-5)
[ 0.000000] Linux version 5.19.5-arch1-1 (linux@archlinux) (gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.39.0) #1 SMP PREEMPT_DYNAMIC Mon, 29 Aug 2022 15:51:05 +0000
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=d55fa944-b93e-4169-b35e-67037d4ba631 rw pcie_ports=native pci=assign-busses,hpbussize=0x33,realloc,hpmmiosize=4M,hpmmioprefsize=64G loglevel=3
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x200: 'Protection Keys User registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: xstate_offset[9]: 832, xstate_sizes[9]: 8
[ 0.000000] x86/fpu: Enabled xstate features 0x207, context size is 840 bytes, using 'compacted' format.
[ 0.000000] signal: max sigframe size: 3376
Aug 31 18:16:28 bbox-arch kernel: Linux version 5.19.5-arch1-1 (linux@archlinux) (gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.39.0) #1 SMP PREEMPT_DYNAMIC Mon, 29 Aug 2022 15:51:05 +0000
Aug 31 18:16:28 bbox-arch kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=d55fa944-b93e-4169-b35e-67037d4ba631 rw
Aug 31 18:16:28 bbox-arch kernel: x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
Aug 31 18:16:28 bbox-arch kernel: x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
Aug 31 18:16:28 bbox-arch kernel: x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
Aug 31 18:16:28 bbox-arch kernel: x86/fpu: Supporting XSAVE feature 0x200: 'Protection Keys User registers'
Aug 31 18:16:28 bbox-arch kernel: x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
Aug 31 18:16:28 bbox-arch kernel: x86/fpu: xstate_offset[9]: 832, xstate_sizes[9]: 8
Aug 31 18:16:28 bbox-arch kernel: x86/fpu: Enabled xstate features 0x207, context size is 840 bytes, using 'compacted' format.
Aug 31 18