Skip to content

Instantly share code, notes, and snippets.

Avatar

Kamil Trzciński ayufan

View GitHub Profile
View mount-matrix.diff
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 Mar 5, 2020
Run Omnibus GitLab
View run-omnibus.sh
#!/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 Mar 5, 2020
GPG Agent Watcher to show Mac OS notify when SSH sign happens
View gpg-agent-watcher.bash
#!/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 Aug 26, 2019
Install NordVPN on rock64
View nordvpn.rock64.md
@ayufan
ayufan / pinebookpro-power-usage.txt
Last active Jan 14, 2020
Pinebook Pro Power Usage
View pinebookpro-power-usage.txt
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 Jul 3, 2019
Simple Ruby script to gather metrics from GitHub Releases
View download-stats.rb
#!/usr/bin/env ruby
require 'bundler/inline'
gemfile true do
source 'http://rubygems.org'
gem 'table_print'
end
require 'json'
@ayufan
ayufan / asound-amix.txt
Created Jun 21, 2019
`/proc/asound/amix` from Android playing audio
View asound-amix.txt
rk3399_mid:/proc/asound # amix
Card:0
id iface dev sub idx num perms type name
1 MIXER 0 0 0 2 rw R INT32 HP Playback Volume: 0 0 { 0-0 }
2 MIXER 0 0 0 2 rw R INT32 HPMixer Gain: 3 3 { 0-7 }
3 MIXER 0 0 0 2 rw R INT32 DAC Playback Volume: 192 192 { 0-192 }
4 MIXER 0 0 0 1 rw BOOL Enable DAC Soft Ramp: ON { OFF=0, ON=1 }
5 MIXER 0 0 0 1 rw INT32 DAC Soft Ramp Rate: 0 { 0-4 }
6 MIXER 0 0 0 1 rw ENUM Playback Polarity: (0 Normal) { Normal=0, R Invert=1, L Invert=2, L + R Invert=3 }
7 MIXER 0 0 0 1 rw BOOL DAC Notch Filter: OFF { OFF=0, ON=1 }
@ayufan
ayufan / rk3399-pinebook-pro-v2-android.dts
Created Jun 5, 2019
Android DTS for Pinebook Pro v2
View rk3399-pinebook-pro-v2-android.dts
/dts-v1/;
/memreserve/ 0x0000000005600000 0x0000000000014000;
/memreserve/ 0x0000000005bf0000 0x00000000001ad6cc;
/ {
compatible = "rockchip,rk3399-mid\0rockchip,rk3399";
interrupt-parent = < 0x01 >;
#address-cells = < 0x02 >;
#size-cells = < 0x02 >;
@ayufan
ayufan / MSI_LED.cs
Created Feb 14, 2019
The MBAPI_x86.dll interface
View MSI_LED.cs
namespace MSI_LED
{
using System;
using System.Runtime.InteropServices;
internal static class MB
{
internal const string MB_DLL_FileName = @"Lib\MBAPI_x86.dll";
[DllImport(@"Lib\MBAPI_x86.dll")]
@ayufan
ayufan / sdcard-vs-ssd.md
Created Dec 22, 2018
Rock64 SDCard vs SSD
View sdcard-vs-ssd.md

SDCard Samsung EVO+ 32GB

Command line used: iozone -e -I -a -s 100M -r 16k -r 512k -r 1024k -i 0 -i 1 -i 2 -f /sdcard/test

                                                          random    random     bkwd    record    stride                                    
          kB  reclen    write  rewrite    read    reread    read     write     read   rewrite      read   fwrite frewrite    fread  freread
      102400      16     8490     9201    14664    14678    14657     8770                                                          
      102400     512    20849    21052    22413    22475    22452    20742                                                          
      102400    1024    15644    18549    22679    22703    22702    20718