Skip to content

Instantly share code, notes, and snippets.

@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
@kuri65536
kuri65536 / ReportArmbianWithZ69MaxTVBox.md
Last active April 5, 2018 22:57
The results of use Armbian or Libreelec images with my Z69Max TV Box

The box is Z69 Max

vendor: KimTin? LZHOKK?

RAM 3G, Ether 1000M

current choice: Armbian 5.41 + Kernel 3.14.29 + Ubuntu Mate

  • WiFi not work (mine with ether and useful).
@kuri65536
kuri65536 / iptables_allow_hpprinter.sh
Last active May 13, 2024 13:36
iptables allow ports commands for HP Printer
if1=br0
if2=wlan1
net=192.168.2.0/24
ip=192.168.2.2
iptables -I FORWARD -i $if1 -o $if2 -s $net -d $ip -p udp -m multiport \
--dports 80,137,138,161,427,443,5222,5223,5297,5298,5353 \
-m state --state NEW -j ACCEPT
iptables -I FORWARD -i $if1 -o $if2 -s $net -d $ip -p tcp -m multiport \
--dports 80,137,139,427,443,5222,5223,5297,5298,5353,9100,9220,9500 \
-m state --state NEW -j ACCEPT
@kuri65536
kuri65536 / FreeCAD Macro, Export Group to STL.py
Created February 17, 2018 19:20
FreeCAD Macro, Export Group to STL
# -*- coding: utf-8 -*-
import os
import FreeCAD
import Mesh
__objs__ = Gui.Selection.getSelection()
if len(__objs__) > 0:
fname = FreeCAD.ActiveDocument.FileName
dname = os.path.dirname(fname)
fname, fext = os.path.splitext(os.path.basename(fname))