Skip to content

Instantly share code, notes, and snippets.

View pluser's full-sized avatar

ESASHIKA Kaoru pluser

View GitHub Profile
@pluser
pluser / SurfingKeys.conf
Created April 4, 2023 16:19
Configuration for the SurfingKeys
api.Hints.setCharacters('ueohtnasid');
// an example to create a new mapping `ctrl-y`
api.mapkey('<ctrl-y>', 'Show me the money', function() {
Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
});
// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works.
api.map('gt', 'T');
@pluser
pluser / sound-usb-quirks.patch
Created November 19, 2021 03:21
A kernel patch for Olympus Voice Recorder LS-P2
--- a/sound/usb/quirks.c 2021-03-05 05:54:00.455338183 +0900
+++ b/sound/usb/quirks.c 2021-03-05 05:59:33.575988574 +0900
@@ -1516,6 +1516,7 @@
case USB_ID(0x05a3, 0x9420): /* ELP HD USB Camera */
case USB_ID(0x05a7, 0x1020): /* Bose Companion 5 */
case USB_ID(0x074d, 0x3553): /* Outlaw RR2150 (Micronas UAC3553B) */
+ case USB_ID(0x07b4, 0x027d): /* Olympus Voice Recorder LS-P2 */
case USB_ID(0x1395, 0x740a): /* Sennheiser DECT */
case USB_ID(0x1901, 0x0191): /* GE B850V3 CP2114 audio interface */
case USB_ID(0x21b4, 0x0081): /* AudioQuest DragonFly */
@pluser
pluser / start_capture.sh
Created February 27, 2021 15:28
Start mpv to capture external video
#!/bin/sh
v4l2-ctl --device /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=0
v4l2-ctl --device /dev/video0 --get-fmt-video
mpv av://v4l2:/dev/video0 --profile=low-latency --no-correct-pts --fps=30 --demuxer-lavf-format=video4linux2 --demuxer-lavf-o=input_format=mjpeg
@pluser
pluser / com.github.xournalpp.xournalpp.desktop
Created February 25, 2021 08:01
Xournal++ desktop entry
[Desktop Entry]
Categories=Office;GNOME;GTK;
Comment=Take handwritten notes
Comment=Take handwritten notes
Comment[ca]=Preneu notes a mà
Comment[cs]=Dělejte si rukou psané poznámky
Comment[de]=Handnotizen erstellen
Comment[fr]=Prise de notes manuscrites
Comment[pl]=Notatki odręczne
Comment[ru]=Делайте рукописные заметки
@pluser
pluser / entropy.jl
Created December 14, 2020 09:30
Compute entropy of 1-dimensional array of time series data
#-*- mode: julia-mode -*-
if abspath(PROGRAM_FILE) == @__FILE__
using ArgParse
using HDF5
using CSV
end
using Memoize
@pluser
pluser / reports.md
Last active June 21, 2020 07:43
Daily Reports for Fusebox Project

Reports / ChangeLog

This file is daily reports for Fusebox project. I will add newline every week day.

2020-06-20

  • Implement link/unlink API. that is needed to handle hardlinks.
  • Make sure 'emerge -p gentoo-source` is working.

2020-06-19

@pluser
pluser / tarai.c
Created May 25, 2020 08:27
compare speed of loop with Python and C.
#include <stdio.h>
int counter = 0;
int tarai(int x, int y, int z) {
counter++;
if (x <= y) return y;
else return tarai(tarai(x-1, y, z), tarai(y-1, z, x), tarai(z-1, x, y));
}
@pluser
pluser / fix-navi-reset.patch
Last active November 19, 2021 14:47
Navi (new AMD GPU card) doesn't have proper reset method. This is a patch downloaded from https://aur.archlinux.org/cgit/aur.git/tree/navi_reset.patch?h=linux-fix_navi_reset
--- a/drivers/pci/quirks.c 2021-07-04 16:26:40.345636618 +0200
+++ b/drivers/pci/quirks.c 2021-07-04 16:14:15.504916148 +0200
@@ -3998,6 +3998,132 @@
return 0;
}
+/*
+ * AMD Navi 10 series GPUs require a vendor specific reset procedure.
+ * According to AMD a PSP mode 2 reset should be enough however at this
+ * time the details of how to perform this are not available to us.
@pluser
pluser / amdgpu-bind.sh
Last active December 1, 2019 08:27
VFIO amdgpu related scripts
#!/bin/bash
modprobe amdgpu
for dev in "$@"; do
vendor=$(cat /sys/bus/pci/devices/$dev/vendor)
device=$(cat /sys/bus/pci/devices/$dev/device)
if [ -e /sys/bus/pci/devices/$dev/driver ]; then
echo $dev > /sys/bus/pci/devices/$dev/driver/unbind
fi
echo $vendor $device > /sys/bus/pci/drivers/amdgpu/new_id
done
@pluser
pluser / barrier.json
Last active October 30, 2019 16:32
Install Script for the Barrier with the Scoop Package Management System
{
"##": "Install Script for the Barrier with the Scoop Package Management System",
"version": "2.3.2",
"description": "Barrier is KVM software forked from Symless's synergy 1.9 codebase. Synergy was a commercialized reimplementation of the original CosmoSynergy written by Chris Schoeneman.",
"homepage": "https://github.com/debauchee/barrier",
"license": "GPL-2.0",
"url": "https://github.com/debauchee/barrier/releases/download/v2.3.2/BarrierSetup-2.3.2.exe",
"hash": "a6a195c55c199b35c737d7494327b37da94ded4eb2592871d4ad747aa8baa39a",
"installer": {
"args": [