Skip to content

Instantly share code, notes, and snippets.

View RyuaNerin's full-sized avatar
🏠
Room-keeper

RyuaNerin RyuaNerin

🏠
Room-keeper
View GitHub Profile
@RyuaNerin
RyuaNerin / FFXIVMap.cs
Created January 6, 2018 05:51
맵 좌표 계산 및 역산 클래스
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace NPCBot
include Irvine32.inc
.data
n1 DWORD 1
n2 DWORD 1
.code
main PROC
mov ecx, 9
F1:
push ecx
inc n1
using System;
using System.Runtime.InteropServices;
using System.Text;
internal sealed class WinShortcut : IDisposable
{
private ShellLinkCoClass m_shellLinkW;
private IShellLinkW m_shellLink;
private IPersistFile m_persistFile;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace RyuaNerin
{
@RyuaNerin
RyuaNerin / pin_potplayer_to_top.c
Last active August 12, 2016 18:21
팟플레이어 최상위 고정
#include <Windows.h>
static HWND hPotPlayer;
void CALLBACK WinEventProc(HWINEVENTHOOK hWinEventHook, DWORD event, HWND hwnd, LONG idObject, LONG idChild, DWORD idEventThread, DWORD dwmsEventTime)
{
if (idObject != 0 || idChild != 0 || hwnd == hPotPlayer)
return;
SetWindowPos(hPotPlayer, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
@RyuaNerin
RyuaNerin / Base64Write.cs
Last active April 9, 2016 21:22
From Stream -> Base64 -> To Stream
private static byte[] Base64Table = {
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a,
0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54,
0x55, 0x56, 0x57, 0x58, 0x59, 0x5a,
0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a,
0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74,
0x75, 0x76, 0x77, 0x78, 0x79, 0x7a,
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
0x2b, 0x2f, 0x3d }; // ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
// 0x2d, 0x5f, 0x3d }; // ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=
@RyuaNerin
RyuaNerin / LoadPSD.cs
Last active August 3, 2018 12:28
Load PSD File. support all of psd channel types. https://ryuanerin.kr/post/2016-04-06-loadpsd
// LoadPSD
// Made by RyuaNerin
// https://ryuanerin.kr/post/2016-04-06-loadpsd
//
// *** VERSION
// rev. 1 (2016-04-06)
//
// *** SUPPORT
// Net Framework 2.0 or newer
// (Grayscale, Indexed, RGB, CMYK, MultiChannel, Duotone, Lab) + (8/16/32 bit color depth) + alpha channel
private static void RLEDecompress(byte[] data, byte[] output, int count)
{
// https://en.wikipedia.org/wiki/PackBits
int dind = 0;
int ind = 0;
int len;
byte val;
while (ind < count)
{
using System;
using System.Collections.Generic;
namespace RyuaNerin
{
public sealed class ExtendStringComparer : IComparer<string>
{
public static readonly Comparison<string> Comparison = new Comparison<string>(CompareTo);
public static readonly ExtendStringComparer Instance = new ExtendStringComparer();
@RyuaNerin
RyuaNerin / Parse Cookie.cs
Last active April 5, 2016 23:39
Convert Set-Cookie header of WebResponse to CookieCollection https://ryuanerin.kr/post/2016-03-31-parse-cookie