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| /* Copied, Pasted and summarized from ps' source code. | |
| You can use sysctl to get other process' argv. | |
| */ | |
| #include <sys/sysctl.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #define pid_of(pproc) pproc->kp_proc.p_pid |
| /*when you use an onclick event in an html element,iPhone webkit browser would have a delay.So you should deal with it.This part of js would help you.You just need to add this file in your html page and use ontouchstart/ontouchend/ontouchmove to replace onclick event */ | |
| /* 当你在使用onclick事件的时候,iPhone手机上面的safari浏览器会对事件产生一个延误(大概是0.3秒左右),这个时候你必须对这个事件作出一些处理。 然后用ontouchstart ontouchend ontouchmove去代替原本的onclick事件即可*/ | |
| /* how to use it? <a onclick="alert('touch me');">Touch Me</a> that's it */ | |
| /* 怎么用它,<a ontouchstart="alert('摸我一下');">摸我</a> that's it */ | |
| function NoClickDelay(el) { | |
| this.element = el; |
| // | |
| // FMInfoPanelViewController.h | |
| // Created by Florian Mielke (@FlorianMielke) on 06.12.11. | |
| // | |
| #import <UIKit/UIKit.h> | |
| #import <Foundation/Foundation.h> | |
| #import <QuartzCore/QuartzCore.h> | |
| @interface FMInfoPanelViewController : UIViewController <UIScrollViewDelegate> |
| // | |
| // UIDeviceHardware.h | |
| // | |
| // Used to determine EXACT version of device software is running on. | |
| #import <Foundation/Foundation.h> | |
| @interface UIDeviceHardware : NSObject | |
| - (NSString *) platform; |
| #import <UIKit/UIKit.h> | |
| #import <ImageIO/ImageIO.h> | |
| #import <MobileCoreServices/MobileCoreServices.h> | |
| - (void)exportAnimatedGif | |
| { | |
| UIImage *shacho = [UIImage imageNamed:@"shacho.png"]; | |
| UIImage *bucho = [UIImage imageNamed:@"bucho.jpeg"]; | |
| NSString *path = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"animated.gif"]; |