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
;シフトで範囲選択 | |
(pc-selection-mode 1) | |
;バックアップ作らない | |
(setq make-backup-files nil) | |
;オートセーブしない | |
(setq auto-save-default nil) | |
;スタート画面を表示しない | |
(setq inhibit-startup-message t) | |
;ツールバーを隠す |
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
alias ls="ls -v" | |
export LANG=ja_JP.UTF-8 | |
alias emacs="/Applications/Emacs.app/Contents/MacOS/Emacs" | |
export PATH=/opt/local/bin/:/opt/local/sbin/:$PATH | |
export PATH=/usr/local/ActivePerl-5.10/bin/:/usr/local/bin/:$PATH | |
alias perl=perl5.10.0 | |
alias pstop="ps aux | grep top" |
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
(function(){var w = $(window).width(), h = $(window).height();getMouseX = function(e){return e.x;};getMouseY = function(e){return e.y;};setInterval(function(){for(var x = 0; x < w; x+=10){for(var y = 0; y < h; y+=10){onMouseDown({x:x,y:y});}}}, 3000);})() |
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
#import "UserAgent.h" | |
@implementation UserAgent | |
// iOS4.3 later | |
+ (NSString *)defaultUserAgent { | |
// shared | |
static dispatch_once_t pred = 0; | |
__strong static NSMutableDictionary *userAgentTable; | |
dispatch_once(&pred, ^{ | |
userAgentTable = [[NSMutableDictionary alloc] init]; |
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
#import <Foundation/Foundation.h> | |
@interface UserAgent : NSObject<UIWebViewDelegate> | |
@property BOOL loaded; | |
+ (NSString *)defaultUserAgent; | |
@end |
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
var TestEnvironment = (function(){ | |
return { | |
seed: 1, | |
count: 100, | |
current: { | |
args: [], | |
isPassed: false, | |
isSkipped: false, | |
set: function( args, prop ){ |
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
- (BOOL)propAdd:(NSInteger)a b:(NSInteger)b { | |
return [Hoge add:a b:b] == a + b; | |
} | |
- (void)testAdd { | |
NLTQuickCheckTests *testCase = [NLTQuickCheckTest testWithName:@"exsample" | |
propSelector:@selector(propAdd:b:) | |
arbitrarys:[NSArray arrayWithObjects:[NLTQuickCheckArbitrary intArbitray], | |
[NLTQuickCheckArbitrary intArbitray], 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
require 'formula' | |
class Emacs < Formula | |
url 'http://ftp.gnu.org/pub/gnu/emacs/emacs-24.1.tar.gz' | |
md5 '368d79b0dbb4aef9886bd8d6ba08ed77' | |
homepage 'http://www.gnu.org/software/emacs/' | |
if ARGV.include? "--use-git-head" | |
head 'git://git.sv.gnu.org/emacs.git' | |
else |
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
// 出所:http://wizard.st/blog/archives/156 | |
// :http://fredandrandall.com/blog/2011/03/31/how-to-change-the-color-of-a-uibarbuttonitem/ | |
UIBarButtonItem *item = nil; | |
if ([[[UIDevice currentDevice] systemVersion] floatValue] > 4.9) { | |
item = [[UIBarButtonItem alloc] initWithTitle:title | |
style:useStyle | |
target:self | |
action:@selector(toolBarButtonTapped:)]; |
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
UIBarButtonItem *item = nil; | |
UIImage *image = [UIImage imageNamed:@"navigation_bar_back_button"]; | |
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; | |
[button setBackgroundImage:image forState:UIControlStateNormal]; | |
[button addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside]; | |
[button setTitle:@"ほげ" forState:UIControlStateNormal]; | |
button.titleLabel.textColor = [UIColor whiteColor]; | |
button.titleLabel.textAlignment = UITextAlignmentCenter; | |
button.titleLabel.font = [UIFont boldSystemFontOfSize:12]; | |
button.frame = CGRectMake(0, 0, image.size.width, image.size.height); |
OlderNewer