Skip to content

Instantly share code, notes, and snippets.

@MoePus
MoePus / jquery.waituntilexists.js
Created December 27, 2016 11:35 — forked from PizzaBrandon/jquery.waituntilexists.js
Updated waitUntilExists plugin
;(function ($, window) {
var intervals = {};
var removeListener = function(selector) {
if (intervals[selector]) {
window.clearInterval(intervals[selector]);
intervals[selector] = null;
}
@MoePus
MoePus / d3d9_proxy_dll_memo.md
Created December 9, 2017 09:49 — forked from t-mat/d3d9_proxy_dll_memo.md
D3D9プロキシDLLの作り方

D3D9プロキシDLLの作り方

知りたいこと

既存の D3D アプリケーションのレンダリング結果に、 自前のポスト処理/オーバーレイを付加したり、スクリーンショット撮ったりする (FXAA とかああいう) のはどーやってるの?

逆順に説明すると、以下のようになる:

@MoePus
MoePus / vmdComb.py
Created February 15, 2018 14:04
Combine vmd data with physics data from mmdbridge
import os,sys,io
from struct import pack,unpack
if len(sys.argv) < 3:
print("not enough input file")
exit(-1)
class VMD:
def __init__(self,fn):
@MoePus
MoePus / aiDenoiserCaller.py
Created June 20, 2018 12:27
AiDenoiser Caller
import os,sys
import subprocess
if len(sys.argv) <2:
exit()
rootdir = sys.argv[1]
dedir = (rootdir if rootdir[-1] not in ["\\",'/'] else rootdir[0:-1])+"_denoised"
try:
os.mkdir(dedir)
shaderPack = r'C:\ProgramData\Redshift\Data\Redshift1.dat'
from struct import unpack
import os
shaderdataFloder = r'Redshift1'
os.makedirs(shaderdataFloder,exist_ok=True)
def dint(b):
return unpack("i",b)[0]
"""
from waigua.Util import *
src = liezao.malloc(8)
dst = liezao.malloc(8)
liezao.doCall(readU64(0x144B51330),dst)
liezao.doCall(readU64(0x144B50FF8),src,"3a85aa1edaae3aaa5aaafaaa5aa5ea7a7aae5aaa3caadaa5feaafaaadaaaadaaaadddaaa6daa5a6e2aadacdabada3aaa")
liezao.doCall(0x140EFEB40,src,dst)
"""
hwid = open("md.hw").read().strip()
sbox = [
@MoePus
MoePus / Get.NetAssemblyOffset.cs
Last active March 13, 2020 09:32
Get.NetAssemblyOffset
using System;
using System.Reflection;
using System.Reflection.Emit;
using System.Linq;
using System.Runtime.Serialization;
using System.IO;
//partially from https://devblogs.microsoft.com/premier-developer/managed-object-internals-part-4-fields-layout/
namespace Main
{
class InspectorHelper
@MoePus
MoePus / inheritable.py
Created September 4, 2020 09:01
IDA struct to cppstruct
def serialize_ordinal(n):
frame = '=%s#'
body = ''
def get_chunk(level):
if level < 2:
return 1
return 64 * (128 ** (level-2))
#if UNITY_EDITOR
using UnityEngine;
using UnityEditor;
using CustomAvatar;
using System;
using System.Linq;
using System.Reflection;
using System.Collections.Generic;
public class DBTransfer : MonoBehaviour
@MoePus
MoePus / python static build on windows.md
Created January 22, 2021 08:25
python static build on windows.md

replace all <ConfigurationType>DynamicLibrary</ConfigurationType> with <ConfigurationType>StaticLibrary</ConfigurationType> in *.vcxproj

#define Py_NO_ENABLE_SHARED
#define MS_NO_COREDLL
``` in pyconfig.h

remove `Py_ENABLE_SHARED` in pythoncore.vcxproj

manual set MT and /Zl in all vcxproj.