Skip to content

Instantly share code, notes, and snippets.

View JALsnipe's full-sized avatar
🥴

Josh Lieberman JALsnipe

🥴
View GitHub Profile
@leptos-null
leptos-null / ios_image_app_url_dump.m
Last active May 14, 2023 17:30
Dump URL schemes from an iOS system image (stock applications)
//
// ios_image_app_url_dump
//
// Created by Leptos on 2/19/19.
// Copyright © 2019 Leptos. All rights reserved.
//
/* compile with:
* $ clang -fobjc-arc -framework Foundation
*/
@SciresM
SciresM / switch_romfs.py
Created July 19, 2017 01:10
Switch RomFS (IStorage) -> Files
from struct import unpack as up
import sys, os
dirs, files = None, None
def read_at(fp, off, len):
fp.seek(off)
return fp.read(len)
def read_u8(fp, off):
@mayoff
mayoff / main.m
Created May 31, 2017 15:43
adding objc_boxable to CoreGraphics structs
@import Foundation;
@import CoreGraphics;
typedef struct __attribute__((objc_boxable)) CGPoint CGPoint;
typedef struct __attribute__((objc_boxable)) CGSize CGSize;
typedef struct __attribute__((objc_boxable)) CGRect CGRect;
typedef struct __attribute__((objc_boxable)) CGVector CGVector;
int main(int argc, const char * argv[]) {
@autoreleasepool {
@SimplGy
SimplGy / optionalEnum.swift
Last active July 19, 2016 18:21
Switching on optional enums
enum Coin {
case heads
case tails
}
var result: Coin?
// You can pattern match against it like an optional:
switch result {
case .heads?: print("heads")
case .tails?: print("tails")
@anthonya1999
anthonya1999 / UIDevice+Extensions.h
Last active June 15, 2018 06:54
Just some cool extensions that can tell you some more stuff about a device (all work on latest iOS version)
#import <UIKit/UIKit.h>
#include <dlfcn.h>
static const CFStringRef kMGDieID = CFSTR("DieId");
typedef NS_ENUM(NSInteger, BKSInterfaceOrientation) {
BKSInterfaceOrientationPortrait = 1,
BKSInterfaceOrientationPortraitUpsideDown = 2,
BKSInterfaceOrientationLandscapeRight = 3,
BKSInterfaceOrientationLandscapeLeft = 4
@adeekshith
adeekshith / .git-commit-template.txt
Last active October 20, 2024 21:10 — forked from Linell/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@nuomi1
nuomi1 / PrintBootCampESDInfo.swift
Last active October 26, 2024 07:45
macOS and BootCamp Latest
#!/usr/bin/env swift
//
// PrintBootCampESDInfo.swift
//
// Created by nuomi1 on 8/5/18.
// Copyright © 2018年 nuomi1. All rights reserved.
//
import Foundation
// ==UserScript==
// @name Stack Overflow Real Dark
// @namespace http://github.com/TinyGiant/
// @description Real dark styling for Stack Overflow and some Stack Exchange sites
// @author @TinyGiant
// @run-at document-start
// @version 1.0.1.1m
// @include /^https?:\/\/.*\.?stack(overflow|exchange).com/.*$/
// ==/UserScript==
@mogsdad
mogsdad / FindMyLastChatMsg.user.js
Created October 30, 2015 14:29
Find user's last posted message in a StackExchange chat room
// ==UserScript==
// @name FindMyLastChatMsg
// @author Mogsdad
// @contributor Siguza
// @namespace chat.stackoverflow
// @description Find user's last posted message in a StackExchange chat room
// @include /^https?://chat.(stackoverflow|stackexchange|serverfault|superuser|askubuntu|stackapps)\.com/rooms/.*/
// @version 1.0.0.0
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Stack Overflow Real Dark
// @namespace http://github.com/TinyGiant/
// @description Real dark styling for Stack Overflow and some Stack Exchange sites
// @author @TinyGiant
// @run-at document-start
// @version 1.0.0.6
// @include /^https?:\/\/.*?(stackoverflow.com|stackexchange.com|superuser.com|serverfault.com|askubuntu.com|stackapps.com|mathoverflow.net)/.*$/
// ==/UserScript==