Skip to content

Instantly share code, notes, and snippets.

@yhnmj6666
yhnmj6666 / filter.txt
Last active September 5, 2024 21:07
QxBadDomainsFromUBlock
This file has been truncated, but you can view the full file.
#reigon my block
host-suffix, adcolony.com, reject
host-suffix, adjust.com, reject
host, app-measurement.com, reject
host, ocsp.apple.com, reject
host-suffix, applovin.com, reject
host-suffix, applvn.com, reject
host-suffix, clarity.ms, reject
host-suffix, doubleclick.net, reject
host, firebaselogging-pa.googleapis.com, reject
@yhnmj6666
yhnmj6666 / office.fontSize.md
Created November 14, 2020 06:32 — forked from l2dy/office.fontSize.md
Microsoft Office / Word 字号对照表
pt 字号
5 八号
5.5 七号
6.5 小六
7.5 六号
9 小五
10.5 五号
12 小四
14 四号
@yhnmj6666
yhnmj6666 / split.py
Last active July 19, 2020 12:38
Number Split
# split a number into a array that
# the sum of array equals to the input number
import numpy as np
from numpy.random import default_rng
import pandas as pd
#configs
presicion=2
calcPrecision=presicion+3
@yhnmj6666
yhnmj6666 / RefreshHandle.cpp
Created May 13, 2020 12:09
Bind std handles to AllocConsole()
void BindCrtHandlesToStdHandles(bool bindStdIn, bool bindStdOut, bool bindStdErr)
{
// Re-initialize the C runtime "FILE" handles with clean handles bound to "nul". We do this because it has been
// observed that the file number of our standard handle file objects can be assigned internally to a value of -2
// when not bound to a valid target, which represents some kind of unknown internal invalid state. In this state our
// call to "_dup2" fails, as it specifically tests to ensure that the target file number isn't equal to this value
// before allowing the operation to continue. We can resolve this issue by first "re-opening" the target files to
// use the "nul" device, which will place them into a valid state, after which we can redirect them to our target
// using the "_dup2" function.
if (bindStdIn)
@yhnmj6666
yhnmj6666 / ida_memdump.py
Created May 13, 2020 03:03 — forked from herrcore/ida_memdump.py
Dump a blob of memory into a file - IDA Pro script
import idautils
import idaapi
def memdump(ea, size, file):
data = idc.GetManyBytes(ea, size)
with open(file, "wb") as fp:
fp.write(data)
print "Memdump Success!"