Skip to content

Instantly share code, notes, and snippets.

View ferib's full-sized avatar
🌑
Live, Laugh, Lua

Ferib Hellscream ferib

🌑
Live, Laugh, Lua
View GitHub Profile
@ferib
ferib / npub1.py
Created October 6, 2025 11:33
Converts pubkey to Nostr address
#!/usr/bin/env python3
"""
% python3 npub1.py 0350dbc4dfd2313112fa6d1ac3effed7d1428b3c8dcc7357c0b84bac8f356a1894
Compressed BTC pubkey (hex): 0350dbc4dfd2313112fa6d1ac3effed7d1428b3c8dcc7357c0b84bac8f356a1894
Nostr x-only pubkey (hex) : 50dbc4dfd2313112fa6d1ac3effed7d1428b3c8dcc7357c0b84bac8f356a1894
Nostr npub : npub12rdufh7jxyc397ndrtp7llkh69pgk0yde3e40s9cfwkg7dt2rz2qjdzd2t
"""
import argparse
import binascii
@ferib
ferib / bech32.py
Created October 6, 2025 11:32
Convert compressed pubkey to bech32
#!/usr/bin/env python3
"""
% python3 bech32.py 0350dbc4dfd2313112fa6d1ac3effed7d1428b3c8dcc7357c0b84bac8f356a1894
Compressed pubkey : 0350dbc4dfd2313112fa6d1ac3effed7d1428b3c8dcc7357c0b84bac8f356a1894
HASH160(pubkey) : 21a2db9402e6f788a64bc237aed8bda8fe9c1282
scriptPubKey (hex): 001421a2db9402e6f788a64bc237aed8bda8fe9c1282
bech32 address : bc1qyx3dh9qzummc3fjtcgm6ak9a4rlfcy5zm7t6mn
"""
import argparse, binascii, hashlib, sys
-- TODO: needs gen path, and better state tracking
local Nn = ...
local eggs = {}
local function distance3D(x1, y1, z1, x2, y2, z2)
local dx = x2 - x1
local dy = y2 - y1
local dz = z2 - z1
return math.sqrt(dx * dx + dy * dy + dz * dz)
@ferib
ferib / _StonewroughtPassGateKeeper.lua
Created December 25, 2024 13:41
Auto lever StonewroughtPass
local nn = ...
local os = Objects()
local lastUse = 0
local function tick()
for i=1, #os do
local o = os[i]
if ObjectType(o) == 8 then
local name = ObjectName(o)
AccessCheck,ActivateActCtx,AddConsoleAliasA,AddConsoleAliasW,AddRefActCtx,AddResourceAttributeAce,AddSIDToBoundaryDescriptor,AddScopedPolicyIDAce,AllocConsole,AllocateAndInitializeSid,AllocateUserPhysicalPages,AllocateUserPhysicalPagesNuma,AppContainerFreeMemory,AppContainerLookupMoniker,AppXGetOSMaxVersionTested,AppXPostSuccessExtension,AppXPreCreationExtension,AppXReleaseAppXContext,AreFileApisANSI,AttachConsole,BaseCheckAppcompatCache,BaseCheckAppcompatCacheEx,BaseCleanupAppcompatCacheSupport,BaseDllFreeResourceId,BaseDllMapResourceIdW,BaseDumpAppcompatCache,BaseFlushAppcompatCache,BaseFormatObjectAttributes,BaseFreeAppCompatDataForProcess,BaseGetNamedObjectDirectory,BaseInitAppcompatCacheSupport,BaseReadAppCompatDataForProcess,BaseUpdateAppcompatCache,BasepAdjustObjectAttributesForPrivateNamespace,BasepNotifyTrackingService,Beep,CallNamedPipeW,CancelIo,CancelIoEx,CancelSynchronousIo,CancelWaitableTimer,ChangeTimerQueueTimer,CheckAllowDecryptedRemoteDestinationPolicy,CheckGroupPolicyEnabled,CheckIsMSIXPack
@ferib
ferib / rogue_thievery.lua
Created February 3, 2024 18:09
rogue_thievery.lua
loca nn = ...
enabled = true
local function tick()
if not enabled then return end
local os = Objects()
@ferib
ferib / fuck_classic.lua
Last active May 1, 2023 19:00
HP for target Classic WoW
TargetFrameTextureFrame:SetScript("OnUpdate", function()
local hp = UnitHealth("target")
if not TargetFrameTextureFrameDeadText:IsVisible() then
TargetFrameTextureFrameDeadText:Show()
TargetFrameTextureFrameDeadText:SetWidth(250)
TargetFrameTextureFrameDeadText:SetTextColor(256, 256, 256)
end
local text = "Dead"
@ferib
ferib / DiscordWebhookHandler.cs
Created April 4, 2021 20:19
Discord webhook handler
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
namespace Server
{
class DiscordWebhookHandler
{
@ferib
ferib / ajax_post.js
Created October 14, 2019 14:33
ajax post request
$.ajax({
url: '/api/inpaint', //NOTE: you will get a JS header error when the url is NOT from the same hoste!
type: 'post',
data: fd,
contentType: false,
processData: false,
success: function(data){
//TODO: Set returned image as new "uploaded" image, so the image doesn't reset after submitting again