Skip to content

Instantly share code, notes, and snippets.

module Main where
import Data.Ratio
import Control.Applicative
import Data.List(delete)
import Data.Maybe
import Debug.Trace
type RatioI = Ratio Integer
Mar 18 22:36:43 dskm0-r0 kernel: BUG: kernel NULL pointer dereference, address: 0000000000000000
Mar 18 22:36:43 dskm0-r0 kernel: #PF: supervisor read access in kernel mode
Mar 18 22:36:43 dskm0-r0 kernel: #PF: error_code(0x0000) - not-present page
Mar 18 22:36:43 dskm0-r0 kernel: PGD 0 P4D 0
Mar 18 22:36:43 dskm0-r0 kernel: Oops: 0000 [#1] PREEMPT SMP PTI
Mar 18 22:36:43 dskm0-r0 kernel: CPU: 2 PID: 3048133 Comm: zvol Tainted: P O 5.18.19 #1-NixOS
Mar 18 22:36:43 dskm0-r0 kernel: Hardware name: HP HP EliteDesk 800 G3 DM 65W/829A, BIOS P21 Ver. 02.15 01/31/2018
Mar 18 22:36:43 dskm0-r0 kernel: RIP: 0010:arc_release+0x1e/0x720 [zfs]
Mar 18 22:36:43 dskm0-r0 kernel: Code: db ec 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 41 57 41 56 49 89 fe 41 55 4d 8d 6e 30 41 54 4c 8d 67 1>
Mar 18 22:36:43 dskm0-r0 kernel: RSP: 0018:ffffb44ce76abbc8 EFLAGS: 00010292
@yuchangyuan
yuchangyuan / log
Created January 11, 2023 11:35
ceph osd crash log & meta
This file has been truncated, but you can view the full file.
--- begin dump of recent events ---
-9999> 2023-01-10T08:43:00.921+0000 7f2d177fe700 5 prioritycache tune_memory target: 4294967296 mapped: 3931619328 unmapped: 606273536 heap: 4537892864 old mem: 2845415826 new mem: 2845415826
-9998> 2023-01-10T08:43:01.857+0000 7f2d0ebfd700 10 monclient: tick
-9997> 2023-01-10T08:43:01.857+0000 7f2d0ebfd700 10 monclient: _check_auth_rotating renewing rotating keys (they expired before 2023-01-10T08:42:31.858958+0000)
-9996> 2023-01-10T08:43:01.924+0000 7f2d177fe700 5 prioritycache tune_memory target: 4294967296 mapped: 3931627520 unmapped: 606265344 heap: 4537892864 old mem: 2845415826 new mem: 2845415826
-9995> 2023-01-10T08:43:02.858+0000 7f2d0ebfd700 10 monclient: tick
-9994> 2023-01-10T08:43:02.858+0000 7f2d0ebfd700 10 monclient: _check_auth_rotating renewing rotating keys (they expired before 2023-01-10T08:42:32.859153+0000)
-9993> 2023-01-10T08:43:02.927+0000 7f2d177fe700 5 prioritycache tune_memory target: 4294967296 mapped: 3931627520 unmapped: 606265344 h
@yuchangyuan
yuchangyuan / sunshine.log
Created June 10, 2022 10:45
log for sunshine, try add PC from nvidia shield tv
[min_log_level] -- [verbose]
[2022:06:10:18:43:35]: Info: Found display [/run/_user/1000/wayland-1]
[2022:06:10:18:43:35]: Debug: Available interface: wl_shm(1) version 1
[2022:06:10:18:43:35]: Debug: Available interface: wl_drm(2) version 2
[2022:06:10:18:43:35]: Debug: Available interface: zwp_linux_dmabuf_v1(3) version 3
[2022:06:10:18:43:35]: Debug: Available interface: wl_compositor(4) version 4
[2022:06:10:18:43:35]: Debug: Available interface: wl_subcompositor(5) version 1
[2022:06:10:18:43:35]: Debug: Available interface: wl_data_device_manager(6) version 3
[2022:06:10:18:43:35]: Debug: Available interface: zwlr_gamma_control_manager_v1(7) version 1
[2022:06:10:18:43:35]: Debug: Available interface: zxdg_output_manager_v1(8) version 3
@yuchangyuan
yuchangyuan / sunshine.nix
Created June 10, 2022 02:17
nix package for sunshine
{ stdenv, fetchgit, cmake, pkgconfig
, openssl, boost, libpulseaudio, libopus, ffmpeg, libevdev, libffi
, xorg
, libdrm, libcap, mesa
, wayland
, avahi }:
stdenv.mkDerivation rec {
name = "sunshine-" + version;
version = "v0.13.0";

Keybase proof

I hereby claim:

  • I am yuchangyuan on github.
  • I am yuchangyuan (https://keybase.io/yuchangyuan) on keybase.
  • I have a public key ASAlhyo5o7BImRtexaY7gWkFrIgh8ZRczCMsegZYv6_4aQo

To claim this, I am signing this object:

apikey="API_KEY TO FILL"
function up_txt {
host="$1"
val="$2"
remote="https://zonomi.com/app/dns/dyndns.jsp"
url="${remote}?host=${host}&api_key=${apikey}&ttl=300&type=TXT&value=${val}"
#curl -k -s "$url" &> "/var/lib/letsencrypt/dns_txt.${host}.log"
@yuchangyuan
yuchangyuan / dweb_l504.org
Created May 4, 2021 05:45
dweb 2020-05-04 note

DWeb社区的讨论

jiang、Yu Changyuan, 2021-05-04

关于DWeb Community Call活动

  • 坚持大约每月1次的频度,只要有人参加,人稍微少点没关系;
  • 坚持每次分享者和参与者的交流形式,而非报告者和听众单向灌输的形式;
  • 要求外国朋友进行分享,但社区需要给分享者足够的反馈;

关于dweb china的域名的使用

  • dweb china这个域名(网站)定位于国内(或汉语圈)DWeb相关信息的聚合网站;
@yuchangyuan
yuchangyuan / ceph.org
Created November 14, 2017 06:49
ceph notes

Ceph setup

Setup

Write config

Create /etc/ceph/ceph.conf

[global]
auth cluster required = none
auth service required = none
auth client required = none
0xdca7569ae1206435959e332a1a2aa936a2d52ae5