Skip to content

Instantly share code, notes, and snippets.

@kuri65536
kuri65536 / wl-copy-wrapper.sh
Created July 20, 2026 07:31
Chrome Remote Desktop Wrapper for wl-copy/wl-paste
#!/bin/bash
# ==========================================================
## Chrome Remote Desktop Wrapper for wl-copy/wl-paste
# In a Chrome Remote Desktop (CRD) environment, wl-copy or wl-paste
# may fail because CRD runs on an X11 server (Xvnc/Xorg), whereas
# Wayland tools require a Wayland compositor.
#
# This script acts as a compatibility wrapper, falling back to
# xclip in the manner of wl-copy and wl-paste for X11/CRD sessions.
#
@kuri65536
kuri65536 / Program.cs
Last active July 20, 2026 07:14
.NET Framework RichTextBox Bug Sample
using System;
using System.Reflection;
using System.Windows.Forms;
namespace Project1 {
public static class Program {
[STAThread]
public static int Main(params string[] args) {
var frm = new Form() {
@kuri65536
kuri65536 / Create-Linux-Image-On-NTFS3.md
Last active May 25, 2026 22:32
Sample Script for Linux image file on NTFS3

This Gist contains the configuration for my dual-boot server, which allows Linux to share storage with Windows.

  • Script 1: Set the default boot priority to Debian
  • Script 2: Prepare the image file on NTFS3, Note: Sparse files are currently not supported on NTFS3 in Debian 13 (as of May 2026)
  • Script 3: Automount the NTFS partition and set up the OverlayFS for /home

@kuri65536
kuri65536 / unittest-debug-with-net472.md
Last active February 23, 2025 08:20
Debug C# UnitTest codes with .Net Framework and VSCode in 2025

I spent long time to test my unit-test codes in VSCode. Here is the represantation steps to work the debug functionality.

create the projects

create the empty folder and open it from VSCode, then move to terminal view.

image

enter these commands to create the projects.

@kuri65536
kuri65536 / readme.md
Last active December 6, 2023 14:56
Keywords expansion with Git

git keyword expansions with staging minimum lines

this scripts applies keyword expansions to git cache with minimum lines.

the program of keyword expansions

a bash script to patch keywords expansions with git apply .

you can save this into your .bashrc and use as bash functions.

@kuri65536
kuri65536 / git-append-unrelated-repo-onto-your-repo.md
Last active September 16, 2018 22:41
git append the unrelated repo onto your repo

git append the unrelated repo onto your repo

  • repo-A have revisions: A-1 -> A-2
  • repo-B have revisions: B-1 -> B-2

goal

in repo-B

/** compile command
*
* ```bash
* valac --pkg gtk+-3.0 genie-gtk-drawing-area.gs
* ./genie-gtk-drawing-area
* ```
*
* this is equivalent to https://valadoc.org/gtk+-3.0/Gtk.DrawingArea.html
* but these sample coludn't be got with genie
*
@kuri65536
kuri65536 / GenieHttpsRequest.gs
Created July 18, 2018 03:45
Genie Sample: make HTTPS request to host
/** compile command
*
* ```bash
* valac --pkg gio-2.0 genie-https-get.gs
* ./gui-test
* ```
*
* this is equivalent to https://wiki.gnome.org/Projects/Vala/GIONetworkingSample
* but these sample can't compile with my ubuntu 18.04 valac.
*/
@kuri65536
kuri65536 / GenieGuiBasic.gs
Created July 17, 2018 22:11
Genie Sample: Gtk Window
/** compile command
*
* ```bash
* valac --pkg gtk+-3.0 gui-test.gs
* ./gui-test
* ```
*
* this is equivalent to https://wiki.gnome.org/Projects/Genie/GtkGuiTutorial,
* but these sample can't compile with my ubuntu 18.04 valac.
* I just fix some symbols by add `Gtk.` namespace.
@kuri65536
kuri65536 / ReleaseAndDevelopmentRepos.md
Last active April 5, 2018 21:23
An example of git repositories, which are separated release tree and development tree.

Prepare the repos

$ git clone this/repo develop
$ git clone this/repo release
$ git clone --bare this/repo hosting

hosting repo
$ cd hosting