Skip to content

Instantly share code, notes, and snippets.

@pudquick
pudquick / get_platform.py
Last active August 18, 2022 21:02
Get Mac's serial number, hardware UUID, and board-id via python
import objc
from Foundation import NSBundle
IOKit_bundle = NSBundle.bundleWithIdentifier_('com.apple.framework.IOKit')
functions = [("IOServiceGetMatchingService", b"II@"),
("IOServiceMatching", b"@*"),
("IORegistryEntryCreateCFProperty", b"@I@@I"),
]
@lincank
lincank / resolve_appstore.sh
Created December 25, 2015 08:03
reset hanging App Store download or installation on Mac
rm -r ~/Library/Caches/storeinappd
rm -r ~/Library/Caches/storedownloadd
rm -r ~/Library/Caches/storeassetd
rm -r ~/Library/Caches/storeaccountd
rm -r $TMPDIR../C/com.apple.appstore
rm -r /private/var/folders/*/*/*/com.apple.appstore
rm -r ~/Library/Caches/com.apple.appstore
rm -r ~/Library/Saved\ Application\ State/com.apple.appstore.savedState
rm ~/Library/Preferences/com.apple.appstore.plist
@CTurt
CTurt / gist:27fe7f3c241f69be19e5
Created December 14, 2015 19:24
PS4 kernel exploit tease (root FS dump, and list of PIDs)
[+] Entered shellcode
[+] UID: 0, GID: 0
[DIR]: .
[DIR]: ..
[DIR]: adm
[DIR]: app_tmp
[DIR]: data
[DIR]: dev
[DIR]: eap_user
[DIR]: eap_vsh
#!/bin/sh -x ## or just ` curl -Ls http://git.io/vRozn | sh `.
## Downloads the Mac OS X 10.10 Recovery Partition update,
## Copy's over the 10.10 version of Disk Utility.app, then
## use git to apply a binary patch so it will run on 10.11+.
cd /tmp
rm -rf DU1010
mkdir DU1010
@zunda
zunda / gist:2240e996a35bb5feaa07
Last active August 6, 2019 13:53
Yosemiteでgem install --user-install rabbitするにはPKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfigを指定する
Fetching: gobject-introspection-3.0.7.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing rabbit:
ERROR: Failed to build gem native extension.
/usr/local/opt/ruby/bin/ruby -r ./siteconf20151121-1191-56d1zb.rb extconf.rb
checking for --enable-debug-build option... no
checking for -Wall option to compiler... yes
checking for -Waggregate-return option to compiler... yes
checking for -Wcast-align option to compiler... yes
@LaughingSun
LaughingSun / Cuica-1.wav
Last active April 12, 2022 06:34 — forked from armornick/playwav.c
Play a sound with SDL2 added lots of print information and the ability to specify the wav file as first argument. Woohoo.
@CMCDragonkai
CMCDragonkai / list_generators.hs
Last active August 22, 2023 21:27
Haskell: List Generators like Python's range!
-- comments will show python's equivalent
-- range(1, 11)
a = [1..10]
-- itertools.count()
b = [1..]
-- range(1, 9, 2)
c = [1, 3..7]
@tahmidsadik
tahmidsadik / purgeAndroid.txt
Created September 19, 2015 18:47
How to completely remove Android Studio from Mac OS X
How to Completely Remove Android Studio
Execute these commands from the terminal
rm -Rf /Applications/Android\ Studio.app
rm -Rf ~/Library/Preferences/AndroidStudio*
rm ~/Library/Preferences/com.google.android.studio.plist
rm -Rf ~/Library/Application\ Support/AndroidStudio*
rm -Rf ~/Library/Logs/AndroidStudio*
@ryancdotorg
ryancdotorg / frag32.py
Created August 20, 2015 16:27
A FAT32 fragmenter, because I am a horrible person.
#!/usr/bin/env python
import random
import struct
import sys
# Most of the Fat32 class was cribbed from https://gist.github.com/jonte/4577833
def ppNum(num):
return "%s (%s)" % (hex(num), num)
@mbachmann26
mbachmann26 / new_gist_file
Last active January 18, 2018 03:46 — forked from raduraducu/new_gist_file
Apple Service Diagnostic Disks
Apple Service Diagnostic Disks 25 GB [Original]
Applications : Mac : English
ASD Dual Boot 2.1.5 (2003)
PowerBook G4 (12-inch), PowerBook G4 (17-inch), iMac (17-inch 1GHz), Power Mac G4 (FW 800), Xserve (slot load), eMac (ATI Graphics), and Power Mac G4 (Mirrored Drive Doors 2003), iMac (USB 2.0), PowerBook G4 (15-inch FW800), PowerBook G4 (17-inch 1.33GHz) and PowerBook G4 (12-inch DVD)
ASD 2.5.7