This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class MainWindow : Window{ | |
[DllImport("user32.dll", SetLastError = true)] | |
static extern UInt64 GetWindowLong(IntPtr hWnd, int nIndex); | |
[DllImport("user32.dll")] | |
static extern int SetWindowLong(IntPtr hWnd, int nIndex, UInt64 dwNewLong); | |
[DllImport("user32.dll")] | |
static extern IntPtr GetDesktopWindow(); | |
[DllImport("user32.dll")] | |
static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent); | |
[DllImport("user32.dll", SetLastError = true)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Singleton(object): | |
_instance_lock = threading.Lock() | |
__instance = None | |
def __new__(cls, *args, **kwargs): | |
if cls.__instance is None: | |
with Singleton._instance_lock: | |
cls.__instance = super( | |
Singleton, cls).__new__(cls) | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Website: https://software.intel.com/content/www/us/en/develop/articles/pin-a-binary-instrumentation-tool-downloads.html | |
# License: https://software.intel.com/sites/landingpage/pintool/pinlicense.txt | |
# This snippet: https://gist.github.com/mrexodia/f61fead0108603d04b2ca0ab045e0952 | |
# TODO: lunix support | |
# Thanks to Francesco for showing me this method | |
CPMAddPackage( | |
NAME IntelPIN | |
VERSION 3.18 | |
URL https://software.intel.com/sites/landingpage/pintool/downloads/pin-3.18-98332-gaebd7b1e6-msvc-windows.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/hex" | |
"fmt" | |
"github.com/btcsuite/btcd/btcec/v2" | |
"github.com/btcsuite/btcd/btcec/v2/schnorr" | |
"github.com/btcsuite/btcd/btcutil" | |
"github.com/btcsuite/btcd/chaincfg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copy from https://qianfanguojin.top/2022/09/07/Hexo%E5%8D%9A%E5%AE%A2%E8%BF%9B%E9%98%B6%EF%BC%9A%E4%B8%BA-Next-%E4%B8%BB%E9%A2%98%E7%9A%84-Hexo-%E5%8D%9A%E5%AE%A2%E5%86%85%E5%AE%B9%E6%B7%BB%E5%8A%A0%E6%96%87%E7%AB%A0%E8%BF%87%E6%9C%9F-%E6%97%B6%E6%95%88%E6%8F%90%E7%A4%BA/ | |
// injector.js | |
// 注入文章过期提示 | |
// hexo.extend.injector.register('body_end', `<script src="/js/outdate.js"></script>`,'post') | |
(function() { | |
//不同的日期显示不同的样式,200 天为黄色提示,400天为红色提示,可以自己定义。 | |
let warningDay = 200; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugin: | |
name: "test" |