Skip to content

Instantly share code, notes, and snippets.

View orange-in-space's full-sized avatar
💭
🍊

orange orange-in-space

💭
🍊
View GitHub Profile
@orange-in-space
orange-in-space / SpotifyDesktopClientSongTitleSniffer.cs
Last active May 18, 2021 21:12
Spotify Windows Desktop Client Song Title Sniffer Library!>< (SpotifyのWindowsデスクトップ版のウィンドウタイトルから曲名とか取得するライブラリ><(フックして変化受け取る方式))
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
namespace Orange.SpotifyTools
{
@orange-in-space
orange-in-space / SimpleSendKeys.cpp
Last active September 18, 2018 03:05
minimal send key input app for windows(lazy)(キー入力を送るだけのやつ>< Windows用手抜き)
// SimpleSendKeys.cpp
//
// (c) orange_in_space, 2018
// Licence: CC0
//
// HowToUse:
// SimpleSendKeys.exe VK_keycode(in Hex)
//
// Build:
// VC++2017 "/SUBSYSTEM:WINDOWS"
@orange-in-space
orange-in-space / RustResultTE_modoki.cs
Created October 15, 2018 05:38
RustのResult<T, E>のエラーハンドリングっぽいことをC# で出来ないのかなって思って作ったやつ><;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CsRustResultModoki_orange
{
//
// Rust Result<T, E> in C# ?
@orange-in-space
orange-in-space / ThreeWayComparisonClass.cs
Created January 19, 2019 14:57
ちゃんと型検査される、『「どっちがでかいの?ていうか同じ?」型』><
class HTU
{
public void Test()
{
int a = 10;//IComparable
int b = 42;//IComparable
//こう書くよりも
//if (a == b)
//{
@orange-in-space
orange-in-space / uruudoshi.cs
Last active October 17, 2019 15:57
閏年を論理演算じゃなく判定するやつ!><
using System;
//
// 自信ない><;
//
namespace uruudoshi
{
class Program
{
static void Main(string[] args)
{
@orange-in-space
orange-in-space / ConsoleClipboard.cs
Last active November 18, 2019 12:18
C# コンソールアプリでwin32apiでクリップボードにテキスト送るやつ><(間違ってたらごめんなさい><;)
using System;
using System.Runtime.InteropServices;
namespace ConsoleClipboard
{
class Program
{
static void Main(string[] args)
{
string text = "てすと!><";
@orange-in-space
orange-in-space / ClipboardTextWin32.cs
Last active August 10, 2020 17:33
C# Win32apiでクリップボードにテキスト送るライブラリ的な><(System.Clipboardが使えない場面用><)
using System;
using System.Runtime.InteropServices;
namespace Orange.Fragment
{
//please give it a name you like to namespace><;
//a kind of Clipboard.SetText(), Win32API version
//(C) orange_in_space
@orange-in-space
orange-in-space / RefCounterModoki.cs
Last active November 29, 2019 19:20
C# 用参照カウンタのようなもの><
using System;
namespace RefCounterModokiDev
{
public interface IRefCounterInterface
{
@orange-in-space
orange-in-space / LpstrFilter.cs
Created December 11, 2019 13:54
C# File Common Dialogs Filter Support Class(OpenFileDialogとかのフィルターの文字列ってエレガントじゃないので直接書かないでいいように作った微妙なクラス><)
using System.Collections.Generic;
namespace Orange.Fragment
{
//
// File Common Dialogs Filter Support Class !><;
// (C) orange_in_space
// Licence: CC0
//
// OpenFileDialogとかのフィルターの文字列ってエレガントじゃないので直接書かないでいいように作った微妙なクラス><
@orange-in-space
orange-in-space / Ews.cs
Created June 3, 2021 03:26
EmptyWorkingSetCommand This is the so-called Memory Cleaner. コマンドラインなメモリクリーナー><
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
namespace EmptyWorkingSetCommand
{
class Program