Skip to content

Instantly share code, notes, and snippets.

View ayufan's full-sized avatar

Kamil Trzciński ayufan

View GitHub Profile
@ayufan
ayufan / klipper-make
Last active February 17, 2024 09:28
Easily manage many klipper configs
#!/bin/bash
case "$1" in
config-*)
CONFIG_NAME="$1"
;;
configs)
cd ~/klippy-configs
ls -1 klipper-config-*
@ayufan
ayufan / rpi-4b-sd-usb3.md
Last active February 6, 2023 17:58
RaspberryPI 4B SD card tests over USB3 card reader

Sandisk 32GB Ultra A1 (2022)

	Command line used: iozone -e -I -a -s 100M -r 16k -r 512k -r 1024k -i 0 -i 1 -i 2 -f test
  
                                                              random    random     bkwd    record    stride                                    
              kB  reclen    write  rewrite    read    reread    read     write     read   rewrite      read   fwrite frewrite    fread  freread
          102400      16     9133     8666    21972    20186    19566     9457                                                                
          102400     512    18792    18809    68554    73029    65743    19684                                                                
          102400    1024    18777    15908    60207    65950    70765    18875    
@ayufan
ayufan / bluetooth-copy.bash
Created October 14, 2022 15:08
Steam Deck dual-boot copy Windows Bluetooth Paring
#!/bin/bash
if [[ $# -ne 1 ]]; then
echo "usage: $0 <windows-partition>"
echo " ex.: $0 /dev/nvme0n1p10"
echo " ex.: $0 /dev/mmcblk0p3"
exit 1
fi
if [[ $(id -u) != 0 ]]; then
@ayufan
ayufan / rpi0-2w.md
Last active October 3, 2023 21:26
RPI0/2W optimisation + Hyperpixel/Fsytec CTP

/boot

cp /boot/bcm2710-rpi-3-b.dtb /boot/bcm2710-rpi-zero-2.dtb /boot/bcm2710-rpi-zero-2-w.dtb

/boot/config.txt append

dtoverlay=disable-bt
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-device.dts b/arch/arm64/boot/dts/rockchip/rk3399-device.dts
index e4afa22cf658..3344ce45d5c8 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-device.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-device.dts
@@ -658,6 +658,11 @@ accelerometer@68 {
interrupts = <RK_PC6 IRQ_TYPE_LEVEL_LOW>;
vdd-supply = <&vcc_1v8>;
vddio-supply = <&vcc_1v8>;
+
+ mount-matrix =
@ayufan
ayufan / run-omnibus.sh
Created March 5, 2020 17:52
Run Omnibus GitLab
#!/bin/bash
set -ex
IMAGE="${1:-gitlab/gitlab-ce:latest}"
shift
tmp_dir=$(mktemp -d -t ci-XXXXXXXXXX)
trap "rm -rf $tmp_dir" EXIT
@ayufan
ayufan / gpg-agent-watcher.bash
Created March 5, 2020 14:00
GPG Agent Watcher to show Mac OS notify when SSH sign happens
#!/bin/bash
realpath() {
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
}
DETECT=${DETECT:-notify}
LABEL=eu.ayufan.gpg-agent-watcher
TARGET=~/Library/LaunchAgents/$LABEL.plist
GPG_AGENT_CONF=~/.gnupg/gpg-agent.conf
@ayufan
ayufan / nordvpn.rock64.md
Created August 26, 2019 10:52
Install NordVPN on rock64
@ayufan
ayufan / pinebookpro-power-usage.txt
Last active December 24, 2022 19:09
Pinebook Pro Power Usage
100% brightness - 7W
40% brightness - 4.8W
0% brightness - 3.5W
0% brightness, all cores - 8.5W
100% brightness, all cores - 12.2W
40% brightness, youtube 480p, vp9 - 7.3W
40% brightness, youtube 720p, drop frames, vp9 - 10W
40% brightness, youtube 1080p, choppy, vp9 - 10W
40% brightness, youtube 480p, avc1 - 6.7W
40% brightness, youtube 720p, avc1 - 7W
@ayufan
ayufan / download-stats.rb
Last active July 3, 2019 11:11
Simple Ruby script to gather metrics from GitHub Releases
#!/usr/bin/env ruby
require 'bundler/inline'
gemfile true do
source 'http://rubygems.org'
gem 'table_print'
end
require 'json'