Skip to content

Instantly share code, notes, and snippets.

View twhite96's full-sized avatar
☢️
Cookin

tiff twhite96

☢️
Cookin
View GitHub Profile
BOOL UnhookNT()
{
BOOL fOk = FALSE;
if (HMODULE hmod = GetModuleHandleW(L"ntdll"))
{
if (PIMAGE_NT_HEADERS pinth = RtlImageNtHeader(hmod))
{
PVOID BaseAddress = (PBYTE)hmod + pinth->OptionalHeader.BaseOfCode;

[This portion of call begins at 25:47]

Me: I could make it really easy on you, if you think Apollo is costing you $20 million per year, cut me a check for $10 million and we can both skip off into the sunset. Six months of use. We're good. That's mostly a joke.

Reddit: Six months of use? What do you mean? I know you said that was mostly a joke, but I want to take everything you're saying seriously just to make sure I'm not - what are you referring to?

Me: Okay, if Apollo's opportunity cost currently is $20 million dollars. At the 7 billion requests and API volume. If that's your yearly opportunity cost for Apollo, cut that in half, say for 6 months. Bob's your uncle.

Reddit: You cut out right at the end. I'm not asking you to repeat yourself for a third time, but you legit cut out right at the end. "If your opportunity cost is $10 million" and then I lost you.

@florianwalther-private
florianwalther-private / _app.tsx
Last active March 7, 2023 02:33
_app.tsx structure
interface AppContext {
showLoginModal: () => void,
showTooManyRequestsMessage: () => void,
}
export const AppContext = createContext<AppContext>({
showLoginModal: () => { throw new Error("Context not implemented") },
showTooManyRequestsMessage: () => { throw new Error("Context not implemented") },
});
import argparse
import glob
import plistlib
import re
from os import path, mkdir
import yaml
'''
@getify
getify / 1-post.md
Last active February 27, 2023 00:23
Comparing: array method chaining, generator delegations, and transducing

Comparing: array method chaining, generator delegations, and transducing

I'm writing this quick post to respond to a recent twitter conversation where claims were made about the merits (or lack thereof) of transducers, as they relate to composing list comprehensions (map, filter).

For comparison sake throughout the rest of my post, below you'll find three (actually four!) implementations of a simple list operation demo:

How to update IP addressing on a Proxmox Cluster

When you change something in your network configuration, rather than its the gateway or the IP addressing, you may come under serious troubleshooting on your Proxmox Cluster, so this document will guide you into the necessary steps needed to update your network settings on Proxmox.

Note : You must follow these steps on every single node of your cluster to let it able to handle the synchronization between each node once.

So firstly, you will need to change the network interface configuration of the system; it is preferable for you to set a static IP:

/etc/network/interfaces
@SKaplanOfficial
SKaplanOfficial / saved_current_url.py
Last active September 15, 2023 16:22
PyXA script to save the current Safari tab's URL to a "Saved URLs" note
#!/usr/bin/env python
# Test with PyXA 0.1.0
import PyXA
safari = PyXA.Application("Safari")
notes = PyXA.Application("Notes")
# Get info for current Safari tab
current_tab = safari.front_window.current_tab
@SKaplanOfficial
SKaplanOfficial / select_photos_for_mosaic.py
Last active September 15, 2023 16:22
Using PyXA, Automator, and PIL to create a mosaic of selected images.
import PyXA, math
from PIL import Image
# Execute Automator workflow and receive list of image paths
automator = PyXA.Application("Automator")
workflow = automator.open("/Users/exampleuser/Library/Mobile Documents/com~apple~Automator/Documents/Ask For Photos.workflow")
image_paths = workflow.execute()
# Set base dimensions of mosaic images
base_width = 400
@SKaplanOfficial
SKaplanOfficial / count_shortcuts.py
Last active September 15, 2023 16:22
Using PyXA to get the number of shortcuts in each shortcuts folder
# Tested with PyXA 0.1.0
import PyXA
app = PyXA.Application("Shortcuts")
folders = app.folders()
# Method 1 - Standard iteration
summary = []
for folder in folders:
folder_name = folder.name
num_shortcuts = len(folder.shortcuts())
@cassidoo
cassidoo / base-css.md
Created May 4, 2022 06:37
Base CSS for a plain HTML document

If you don't want to deal with styling a mostly text-based HTML document, plop these lines in and it'll look good:

html {
  font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  font-size: 1.3em;
  max-width: 40rem;
  padding: 2rem;
  margin: auto;
 line-height: 1.5rem;