Skip to content

Instantly share code, notes, and snippets.

View vic4key's full-sized avatar
✔️
Hi, I'm Vic P.

Vic P. vic4key

✔️
Hi, I'm Vic P.
View GitHub Profile
@vic4key
vic4key / openai-fine-tuning-estimate-cost.py
Last active January 10, 2024 14:05
openai-fine-tuning-estimate-cost.py
# Estimated amount of the cost for fine-tuning GPT models
# Common
''' requirements.txt
httpx
numpy
openai
tiktoken
urllib3
@vic4key
vic4key / test-server.json
Last active August 21, 2022 12:45
test-server.json
{
"domainConfig": "http://192.168.0.123",
"listDMBK": [
"http://192.168.0.456",
"http://192.168.0.789"
]
}
@vic4key
vic4key / GitHub - Fork State.js
Last active March 23, 2023 19:16
Tampermonkey - GitHub - Fork State
// ==UserScript==
// @name GitHub - Fork State
// @namespace http://tampermonkey.net/
// @version 0.1
// @description To let you know immediately that you already forked the visiting repository or not
// @author Vic P. @ https://vic.onl/
// @match https://github.com/*/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js
// @run-at document-start
- lấy bài hát liên quan:
http://mp3.zing.vn/xhr/recommend?type=audio&id=ZW67OIA0
- lấy data thông qua key:
http://mp3.zing.vn/xhr/media/get-source?type=audio&key=kmJHTZHNCVaSmSuymyFHLH
http://mp3.zing.vn/html5xml/song-xml/kmJHTZHNCVaSmSuymyFHLH
- lấy info bài hát
https://mp3.zing.vn/xhr/media/get-info?type=audio&id=ZW8I7AAI
@vic4key
vic4key / pe_file.cpp
Created June 29, 2022 18:03 — forked from hshrzd/pe_file.cpp
Common structs for IDA
typedef struct _IMAGE_DOS_HEADER
{
_WORD e_magic;
_WORD e_cblp;
_WORD e_cp;
_WORD e_crlc;
_WORD e_cparhdr;
_WORD e_minalloc;
_WORD e_maxalloc;
_WORD e_ss;
@vic4key
vic4key / fixNvPe.py
Created January 22, 2022 18:34 — forked from cobryan05/fixNvPe.py
Python Script to disable ASLR and make nv fatbins read-only to reduce memory commit
# Simple script to disable ASLR and make .nv_fatb sections read-only
# Requires: pefile ( python -m pip install pefile )
# Usage: fixNvPe.py --input path/to/*.dll
import argparse
import pefile
import glob
import os
import shutil
// ==UserScript==
// @name GitHub - Header Sticky On Top
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author Vic P. @ https://vic.onl/
// @match https://github.com
// @match https://github.com/*/*
// @match https://gist.github.com/*
// @exclude https://gist.github.com/*/*
@vic4key
vic4key / RNUIAPP - ProgressBar.jsx
Created November 12, 2021 15:55 — forked from akulsr0/RNUIAPP - ProgressBar.jsx
React Native UI App - Progress Bar
import React, { useState } from 'react';
import {
Text,
View,
TouchableOpacity,
} from 'react-native';
// npm i react-native-progress
import * as Progress from 'react-native-progress';
@vic4key
vic4key / main.cpp
Created July 17, 2021 20:55 — forked from hasherezade/main.cpp
A native way to enumerate processes (alternative to: EnumProcesses, CreateToolhelp32Snapshot - Process32First - Process32Next)
#include <windows.h>
#include <iostream>
#include "ntddk.h"
bool enum_processes()
{
ULONG retLen = 0;
// check length: