Skip to content

Instantly share code, notes, and snippets.

View takaswie's full-sized avatar

坂本 貴史 takaswie

View GitHub Profile
@takaswie
takaswie / onemix-entries.txt
Created August 13, 2018 15:25
Output of efibootmgr on One Mix
BootCurrent: 0006
Timeout: 1 seconds
BootOrder: 0006,0000,0002,0005
Boot0000* Windows Boot Manager HD(1,GPT,fcfdba89-71af-4068-8a6c-ed765606a95e,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0002* Other Boot Item HD(5,GPT,048e20ad-0f20-42d4-a1b4-1fd64e84200c,0xe735800,0x1c2000)/File(\EFI\BOOT\BOOTX64.EFI)
Boot0005* UEFI: Built-in EFI Shell VenMedia(5023b95c-db26-429b-a648-bd47664c8012)..BO
Boot0006* UEFI: 1.00, Partition 1 PciRoot(0x0)/Pci(0x14,0x0)/USB(7,0)/HD(1,MBR,0x663eb4c4,0x3906b4,0x1240)..BO
@takaswie
takaswie / sample.py
Last active October 7, 2018 14:05
A sample Python 3 script for a new SndTscm object for new features of firewire-tascam driver
#!/usr/bin/env python3
from sys import exit
from time import sleep
import gi
gi.require_version('Hinawa', '2.0')
from gi.repository import Hinawa
unit = Hinawa.SndTscm()
@takaswie
takaswie / pcm-capture-threshold-test.c
Created October 29, 2018 08:57
pcm-capture-threshold-test.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <poll.h>
#include <alsa/asoundlib.h>
@takaswie
takaswie / async-op.c
Created April 5, 2019 13:57
A sample of async operation of GLib.
#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <stdio.h>
#include <stdlib.h>
typedef int CakeFlavor;
typedef int CakeFrostingType;
@takaswie
takaswie / install-signal-handler.rs
Created December 6, 2019 03:48
A Rust sample to install signal handler to quit event loop.
extern crate nix;
extern crate libc;
use nix::sys::signal;
use std::sync::atomic::{AtomicBool, Ordering};
static RUNNING: AtomicBool = AtomicBool::new(false);
extern "C" fn handle(_: libc::c_int, _: *mut libc::siginfo_t,
_: *mut libc::c_void) {
@takaswie
takaswie / avid-trx.py
Last active September 17, 2020 03:41
Avid Adlenarine asynchronous protocol
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (c) 2020 Takashi Sakamoto
import gi
gi.require_version('GLib', '2.0')
gi.require_version('Hinawa', '3.0')
from gi.repository import GLib, Hinawa
@takaswie
takaswie / parse.py
Last active December 25, 2020 00:40
parser for 'perf.data.script.211220202054.txt'
#!/usr/bin/env python3
from sys import argv
from re import compile, search
records = []
with open(argv[1], 'r') as f:
record = []
for line in f.readlines():
@takaswie
takaswie / pcm-rw-interleaved.c
Last active August 29, 2025 10:30
ALSA PCM application to utilize intermediate buffer inner kernel space
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@takaswie
takaswie / dump-offset-and-size.c
Last active October 7, 2021 07:42
ABI compatibility test for asound.h in regards of snd_pcm_mmap_control
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdint.h>
#define __user
#include "path-to-include/uapi/sound/asound.h"
#if defined(PREVIOUS)
@takaswie
takaswie / migration-to-gi-docgen.txt
Created February 19, 2022 07:24
Migration to gi-docgen
# gi-docgenについて
2022/02/19
坂本 貴史
* 概要
* 2021年にGNOMEプロジェクトの標準ドキュメンテーションツールが変わりました
* gtkdocからgi-docgenへ
* gtkdoc