This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (UIImage*)getImageFromWindow:(UIWindow*)aWindow { | |
UIGraphicsBeginImageContext(aWindow.bounds.size); | |
[aWindow.layer renderInContext:UIGraphicsGetCurrentContext()]; | |
UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); | |
return image; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while( CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.01f, FALSE) == | |
kCFRunLoopRunHandledSource); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
via http://infinite-labs.net/bp/#icloud | |
dancing the sweet sync tango | |
Mon 4th | |
iCloud file sync is in my opinion not adopted enough. It may be that the docs are long. Here is iCloud in a couple of useful nuggets: | |
Turn on iCloud in your entitlements. In Xcode, you can find 'em in your target, under the Summary tab, at the bottom. Turn on 'Enable Entitlements' and press + on the iCloud Containers list. | |
You get a folder. Stuff in it gets synchronized around. This is the easy part. You can use the -[NSFileManager URLForUbiquityContainerIdentifier:] call to find out where the container is. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/SpringBoardServices: | |
(__TEXT,__text) section | |
_SBAppWillOrderInContext: | |
30bf0428 b590 push {r4, r7, lr} | |
30bf042a af01 add r7, sp, #4 | |
30bf042c b08e sub sp, #56 | |
30bf042e f64134ca movw r4, 0x1bca | |
30bf0432 f10d0c2c add.w ip, sp, #44 @ 0x2c | |
30bf0436 f6c0044f movt r4, 0x84f | |
30bf043a 447c add r4, pc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Taken from http://www.opensource.apple.com/source/lldb/lldb-69/tools/debugserver/source/RNBServices.cpp | |
RNBServices.cpp [plain text] | |
//===-- RNBServices.cpp -----------------------------------------*- C++ -*-===// | |
// | |
// The LLVM Compiler Infrastructure | |
// | |
// This file is distributed under the University of Illinois Open Source | |
// License. See LICENSE.TXT for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSArray *) runningProcesses { | |
//CTL_KERN,KERN_PROC,KERN_PROC_ALL | |
int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_ALL ,0}; | |
size_t miblen = 4; | |
size_t size; | |
int st = sysctl(mib, miblen, NULL, &size, NULL, 0); | |
struct kinfo_proc * process = NULL; | |
struct kinfo_proc * newprocess = NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <objc/runtime.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include "SwizzleMyNizzleProtocol.h" | |
void SwizzleMethod(Class _class, SEL sel, IMP imp, const char *prefix) { | |
if (_class == nil) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern uint32_t dyld_get_program_sdk_version() WEAK_IMPORT_ATTRIBUTE; | |
extern BOOL DZApplicationUsesLegacyUI(void) | |
{ | |
static dispatch_once_t onceToken; | |
static BOOL legacyUI = NO; | |
dispatch_once(&onceToken, ^{ | |
uint32_t sdk = __IPHONE_OS_VERSION_MIN_REQUIRED; | |
if (dyld_get_program_sdk_version != NULL) { | |
sdk = dyld_get_program_sdk_version(); |
OlderNewer