Skip to content

Instantly share code, notes, and snippets.

View kekyo's full-sized avatar
📡
I'm looking for a job

Kouji Matsui kekyo

📡
I'm looking for a job
View GitHub Profile
@kekyo
kekyo / WaitHandleTasks.cs
Created August 29, 2017 00:07
Task implementation by WaitHandle.
using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
namespace WaitHandleTasks
{
public static class WaitHandleExtension
{
public static Task AsTask(this WaitHandle waitHandle)
@kekyo
kekyo / ConsoleApplication1.cpp
Created February 8, 2018 14:48
Thunk adjuster test
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
class IBase
{
public:
virtual int Method1(int a, int b) = 0;
virtual int Method2(int a, int b) = 0;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace csharp_agg_csv2
@kekyo
kekyo / Program.cs
Created April 17, 2018 00:10
イラク復興支援群の日報 370日分 - 朝日新聞
using System;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using AngleSharp.Dom.Html;
using AngleSharp.Parser.Html;
namespace ConsoleApp1
{
@kekyo
kekyo / Wio3GDacTest.ino
Created May 3, 2018 10:32
DAC enabled Wio 3G test code.
// https://github.com/kekyo/SeeedJP_STM32F4/commit/cf9cd45caaae41c1d5e71eeec5ea3d25bcc2dae0
#include <Wio3GforArduino.h>
Wio3G Wio;
void setup()
{
SerialUSB.begin(115200);
SerialUSB.println("");
@kekyo
kekyo / Program.cs
Created July 3, 2018 09:47
Tracing behavior test
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp2
{
class CalendarControl
@kekyo
kekyo / BrainPad_ChristmasLight.js
Created October 6, 2018 13:57
BrainPad - Christmas light demo (Using APA102 LED belt, from BrainPad Beginners guide)
let center = 12
let startRed = 0
let startGreen = 0
let startBlue = 0
let red = 0
let green = 0
let blue = 0
let data: Buffer = pins.createBuffer(4)
let dummy: Buffer = pins.createBuffer(4)
@kekyo
kekyo / Program.cs
Created October 12, 2018 14:59
BrainPad demonstration at MADOBEN YOKKAICHI 2018
using GHIElectronics.TinyCLR.BrainPad;
using System;
using System.Collections;
using System.Text;
using System.Threading;
namespace TinyCLRApplication1
{
class Program
{
@kekyo
kekyo / Program.cs
Last active November 10, 2018 06:20
What kind of order did we handle exception with filter expressions.
using System;
namespace ExceptionTest
{
class Program
{
static string GetMessage(Exception ex, string banner)
{
Console.WriteLine(banner);
return ex.Message;
@kekyo
kekyo / main.c
Last active November 13, 2018 10:52
How to unwind the signal handler using the longjmp on Windows environment.
#include <stdio.h>
#include <signal.h>
#include <setjmp.h>
jmp_buf jb;
// Run in windows, this handler called from SEH filter context from "_seh_filter_exe()".
// The SEH __try - __except() block contains at "__scrt_common_main_seh(),"
// the callgraph is:
// __scrt_common_main_seh() --> __try --> main() --> [SEGV] --> __except() --> _seh_filter_exe() --> handler()