Skip to content

Instantly share code, notes, and snippets.

Michael Lynn pudquick

Block or report user

Report or block pudquick

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
pudquick / Info.plist
Created Oct 29, 2019 — forked from steventroughtonsmith/Info.plist
[Catalyst] Registering for & responding to AppleScript events in a Mac Catalyst app
View Info.plist
pudquick /
Created Sep 5, 2018 — forked from pdarragh/
Short PyObjC script to get a Mac's serial number without calling `system_profiler`.
# (Note that we must use system Python on a Mac.)
# Quick script to get the computer's serial number.
# Written for @john.e.lamb on the MacAdmins Slack team.
import objc
import CoreFoundation
from Crypto.Cipher import AES
from Crypto.Util import Counter
import struct
typedef struct boot_dat_hdr
unsigned char ident[0x10];
unsigned char sha2_s2[0x20];
unsigned int s2_dst;
pudquick / msqq.rb
Created Jul 31, 2017 — forked from peterc/msqq.rb
Sys V message queues in Ruby on OS X (take one)
View msqq.rb
# Lightweight library to access the System V message queue functionality on Mac OS X (32 and 64 bit)
# Still quite scrappy and needs to be packaged up properly but.. it works!
require 'fiddle'
class MsgQ
LIBC = DL.dlopen('libc.dylib')
IPC_CREAT = 001000
IPC_EXCL = 002000
pudquick / main.m
Created Jun 28, 2017 — forked from steventroughtonsmith/main.m
Load Mach-O executable at runtime and execute its entry point
View main.m
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);
pudquick /
Created Apr 21, 2017 — forked from albertbori/
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac


This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.

Most the credit for these changes go to Dave Holland.


  • Mac OSX 10+
  • Administrator privileges
pudquick /
Last active Jan 22, 2017 — forked from bruienne/
Basic concept for querying for Google Chrome updates based on current Chrome version/OS/arch
import xml.etree.ElementTree as ET
import requests
import uuid
params = {'cup2hreq': 'foo', 'cup2key': 'bar'}
platform = 'mac'
os_version = '10.12'
pudquick / flag_to_string.rb
Created Sep 5, 2016 — forked from djberg96/flag_to_string.rb
Trying to stringify filesystem flags
View flag_to_string.rb
require 'ffi'
class Filesystem
extend FFI::Library
ffi_lib FFI::Library::LIBC
attach_function(:strerror, [:int], :string)
attach_function(:getmntinfo64, [:pointer, :int], :int)
class Statfs < FFI::Struct
pudquick / Get-SSLThumbprint.ps1
Created May 22, 2016 — forked from lamw/Get-SSLThumbprint.ps1
Powershell snippet to help extract the SSL Thumbprint (SHA1) of a remote system
View Get-SSLThumbprint.ps1
Function Get-SSLThumbprint {
View gist:afebd759a1793e376585f4d61b73c333
Quick Instructions for Compiling under OS X
1. Install gcc from Homebrew and set the env variables + aliases:
export CC=/usr/local/bin/gcc-5
export CXX=/usr/local/bin/g++-5
export CPP=/usr/local/bin/cpp-5
export LD=/usr/local/bin/gcc-5
alias c++=/usr/local/bin/c++-5
alias g++=/usr/local/bin/g++-5
You can’t perform that action at this time.