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
// テスト用のクラス | |
@interface MyObject : NSObject | |
@property(nonatomic,retain)NSObject *retainedObject; // retainするプロパティ | |
@property(nonatomic,copy)NSObject *copiedObject; // copyするプロパティ | |
@end | |
@implementation MyObject | |
@synthesize retainedObject,copiedObject; | |
@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
// とあるViewControllerで見かけた書き方。 | |
@interface PAMRootViewController () | |
@property (readonly, strong, nonatomic) PAMModelController *modelController; | |
@end | |
@implementation PAMRootViewController | |
@synthesize modelController = _modelController; | |
- (PAMModelController *)modelController |
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
#pragma mark - YMKMapViewを拡張 | |
// 「表示されている地図」の範囲を「YOLPのローカルサーチ」で探す場合、 | |
// 表示されているエリアの左下と右上の緯度経度が必要となるので、 | |
// YMKMapViewを拡張して取得できるようにする。 | |
@implementation YMKMapView(PMMapViewController) | |
// mapViewの「左下」の緯度経度を取得する | |
-(CLLocationCoordinate2D)leftBottomCoordinate{ | |
return [self convertPoint:CGPointMake(0,self.bounds.size.height) | |
toCoordinateFromView:self]; | |
} |
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
// GoogleReaderの登録bookmarklet | |
// 2012/11/03 from http://www.google.com/reader/ | |
// iOS系SafariのBookmarkに↓を登録しておくと、SafariからGoogleReaderへの登録ができます。 | |
javascript:var%20b=document.body;var%20GR________bookmarklet_domain='http://www.google.com';if(b&&!document.xmlVersion)%7Bvoid(z=document.createElement('script'));void(z.src='http://www.google.com/reader/ui/subscribe-bookmarklet.js');void(b.appendChild(z));%7Delse%7Blocation='http://www.google.com/reader/view/feed/'+encodeURIComponent(location.href)%7D |
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
* AppStoreでアプリを入れるときに「すでにインストール済み」扱いのアプリがあった件 | |
- どうやらアプリがインストール済みかどうかを、Spotlightでチェックしている様子。 | |
-- https://discussionsjapan.apple.com/thread/10116048?start=0&tstart=0 | |
-- https://discussionsjapan.apple.com/message/100577919#100577919 | |
-- おそらく、元HDDの内容を検索Indexに入れて、そっちが反応している感じ。 | |
-- 。。と思ったけど、インデックス再作成してもだめだった。 | |
- 古いHDDに残ってたXCodeを、新しいHDDに移して試してみる。 | |
-- これでXCodeはいけた。 コピーでOK |
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
# -*- coding: utf-8 -*- | |
# Rictyフォントを入れるための手順をまとめた、自分用のRakefileです。 | |
# Ricty http://save.sys.t.u-tokyo.ac.jp/~yusa/fonts/ricty.html | |
# | |
# Rakefileのフォーマット http://www.kyobashi.org/hf/RakeUserGuide/?RakefileFormat | |
# | |
# 2012/11/05 [email protected] | |
# clean/clobberについては http://www2s.biglobe.ne.jp/~idesaku/sss/tech/rake/ | |
require 'rake/clean' |
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
<?xml version="1.0"?> | |
<!-- KeyRemap4MacBookのプライベート設定ファイル --> | |
<!-- 2012/11/05 [email protected] --> | |
<!-- Command_LとOption_Lを入れ替えますが、Tab(アプリ選択),C(コピー),V(ペースト)だけは残します。--> | |
<!-- http://pqrs.org/macosx/keyremap4macbook/document-private-xml.html.ja --> | |
<!-- http://pqrs.org/macosx/keyremap4macbook/xml.html.ja --> | |
<root> | |
<item> | |
<name>Swap Command_L to Option_L,without tab,copy,paste</name> | |
<appendix>Terminal only.</appendix> |
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
#===================== | |
# emacsの設定(zsh,Mac) | |
#===================== | |
# emacsはportでemacs-appをインストール、emacs24.2.1 | |
alias emacs=/Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs | |
alias emacsclient=/Applications/MacPorts/Emacs.app/Contents/MacOS/bin/emacsclient | |
# デーモンモードで起動させ、それに接続する | |
# 素のemacsをオーバーライドしないように、関数名をEとした。 | |
function E(){ |
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
# -*- coding: utf-8 -*- | |
require 'open-uri' | |
require 'rubygems' | |
require 'json' | |
# gistのlistを取得する | |
task :default do | |
url = ('https://api.github.com/users/taktamur/gists'); | |
OpenURI.open_uri(url) do |f| |
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
# Railsでcache (Rails.cache.fetch) | |
# http://blog.twiwt.org/e/ff4c23 | |
# キャッシュの種類は、デフォルトはファイルキャッシュ | |
# ファイルキャッシュの場所はtmp/cache/以下 | |
# 切り替えるには、config/environments/production.rb 等で"config.cache_store"を書き換える | |
gistID = j['id'] | |
@contents[gistID] = Rails.cache.fetch( gistID, :expires_in => 1.hour) do | |
rawURL = j['files'][ j['files'].keys[0] ]['raw_url'] | |
{ "raw" => URI.parse(rawURL).read }; | |
end |
OlderNewer