Skip to content

Instantly share code, notes, and snippets.

View wgaylord's full-sized avatar

William Gaylord wgaylord

View GitHub Profile
@steventroughtonsmith
steventroughtonsmith / main.m
Created March 24, 2016 08:08
Load Mach-O executable at runtime and execute its entry point
void callEntryPointOfImage(char *path, int argc, char **argv)
{
void *handle;
int (*binary_main)(int binary_argc, char **binary_argv);
char *error;
int err = 0;
printf("Loading %s…\n", path);
handle = dlopen (path, RTLD_LAZY);
@lukaskollmer
lukaskollmer / get_available_memory.py
Last active October 2, 2023 11:41
Get memory stats in Pythonista using ctypes
#!/usr/bin/env python3
# Copyright (c) 2016 Lukas Kollmer<[email protected]>
from ctypes import *
from objc_util import ObjCClass
NSProcessInfo = ObjCClass('NSProcessInfo')
NSByteCountFormatter = ObjCClass('NSByteCountFormatter')
@SpotlightKid
SpotlightKid / ImageFrame.py
Last active December 20, 2018 11:06
Remote-controllable digital image frame for iOS/Pythonista
#!python2
# -*- coding: utf-8 -*-
"""Remote-controllable digital image frame with built-in web server."""
import logging
import os
import re
import sys
import threading
import time
@Rawze
Rawze / ana_i2c_tinyslave.ino
Last active November 14, 2024 08:02
Arduino Attiny85 as 2-channel ana in + 1 chan pwm I2C slave device.
/*
ATtiny85 as 2-channel Analog + 1 PWM Output I2C Slave by Rawze. 05-16-2017
Default I2C adress = 0x04.
Program written and tested with ATTiny85 Arduino 8MHz internal clock bootloader.
Don't forget to select 8-Mhz internal clock and flash the bootloader on new hardware before first use.
import logging
import requests
import lxml.html
import sys
sat = "40014" #SAT norrad_cat_id
transmitter = "NSXo8tGxmxpTUMsmSH34FF" #Transmitter UUID
start="2017-12-1 17:00" #Start date and time
end="2017-12-2 03:00" #Stop date and time
@Shasoleosh
Shasoleosh / gmod_commands
Created March 31, 2020 12:24
All default gmod console commands
+alt1
+alt2
+attack
+attack2
+back
+break
+camdistance
+camin
+cammousemove
+camout