most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
-- Found at: http://hints.macworld.com/article.php?story=2007102012424539 | |
-- Example list of processes to ignore: {"xGestures"} or {"xGestures", "OtherApp", ...} | |
property processesToIgnore : {"loginwindow", "talagent", "Dock", "SystemUIServer", "SIMBL Agent", "AFSBackgrounder", "NotificationCenter", "iTunesHelper", "PhotoStreamAgent", "com.apple.dock.extra", "WebProcess", "AppleSpell", "com.apple.qtkitserver", "SophosUIServer", "PTPCamera", "Image Capture Extension", "mdworker", "System Events"} | |
-- Get the size of the Display(s), only useful if there is one display | |
-- otherwise it will grab the total size of both displays | |
tell application "Finder" | |
set _b to bounds of window of desktop | |
set screen_width to item 3 of _b |
+ (NSString *)encodeStringWithCoordinates:(NSArray *)coordinates | |
{ | |
NSMutableString *encodedString = [NSMutableString string]; | |
int val = 0; | |
int value = 0; | |
CLLocationCoordinate2D prevCoordinate = CLLocationCoordinate2DMake(0, 0); | |
for (NSValue *coordinateValue in coordinates) { | |
CLLocationCoordinate2D coordinate = [coordinateValue MKCoordinateValue]; | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
// ...Snipped... | |
[NSClassFromString(@"WebView") _enableRemoteInspector]; | |
// ...Snipped... | |
} | |
And connect in Safari to localhost:9999 |
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
arm64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S |
- (void)dealloc { | |
webView_.delegate = nil; // delegate is self here, so first set to nil before call stopLoading. | |
[webView_ stopLoading]; | |
// UIWebView must be released in the main thread, or we get: | |
// Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a secondary thread. Crashing now... | |
// This is less evil than the proposed http://stackoverflow.com/questions/945082/uiwebview-in-multithread-viewcontroller | |
// Calling removeFromSuperview in a dealloc is ugly and evil, but else UIView has a strong reference to UIWebView and our main-release call would be irrelevant. | |
if (![NSThread isMainThread]) { | |
[webView_ performSelectorOnMainThread:@selector(removeFromSuperview) withObject:nil waitUntilDone:YES]; |
#!/bin/bash | |
# SPDX-License-Identifier: MIT | |
## Copyright (C) 2009 Przemyslaw Pawelczyk <[email protected]> | |
## | |
## This script is licensed under the terms of the MIT license. | |
## https://opensource.org/licenses/MIT | |
# | |
# Lockable script boilerplate | |