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 / 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
@RyuaNerin
RyuaNerin / key.md
Created May 13, 2018 15:51 — forked from sokcuri/key.md
Twitter (un)official Consumer Key

Twitter Official Consumer Key

Twitter for Android

type:            PIN
Consumer key:    3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPhone

type:            PIN

Consumer key: IQKbtAYlXLripLGPWd0HUA

@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;
@RyuaNerin
RyuaNerin / twitter_test.cs
Created February 8, 2015 22:38
트위터 공홈에 있는 방식 그대로 썼다가 망한거
// Same with Twitter
class TwitterStr
{
public TwitterStr(string url, int i1, int i2)
{
this.url = url;
this.indices = new int[] { i1, i2 };
}
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 / UnmanagedMemory.cs
Last active April 5, 2016 23:41
비관리 메모리 관리 편하게 하려고 만든 클래스 https://ryuanerin.kr/post/2016-02-18-unmanaged-memory
// RyuaNerin
/* Usage
using 해서 사용하면 알아서 할당/해제를 해준다
Reallocate 해서 재할당 가능
IntPtr 인자 위치에 대신 사용가능함.
using (var mem = new UnmanagedMemory(4))
{
var toMem = BitConverter.BitConverter.GetBytes(0xF5769972);