Skip to content

Instantly share code, notes, and snippets.

View taktamur's full-sized avatar

Takafumi Tamura taktamur

View GitHub Profile
@taktamur
taktamur / .zshrc
Created June 21, 2013 13:37
小ネタ:gemのexecutable directoryをPATHに追加したい ref: http://qiita.com/paming/items/8276173c8d8c16ef79d9
# =========
# Ruby(gem)
# =========
# Check "gem env" to EXECUTABLE DIRECTORY:
GEM_EXE_DIR=`gem env | grep "EXECUTABLE DIRECTORY" | awk '{print $4}'`
export PATH=$GEM_EXE_DIR:$PATH
@taktamur
taktamur / file0.txt
Created June 15, 2013 15:03
3周遅れぐらいでiOSのSocial.frameworkを使ってみる ref: http://qiita.com/items/9a6b51fa56915d1f1d64
-(void)viewDidAppear:(BOOL)animated
{
// エミュレータでも問題なく動く
// postのクライアント表示はiOSになる。
SLComposeViewController *twitterPostVC = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
[twitterPostVC setInitialText:@"iOSのSocialFrameworkから投稿テスト。\nSLComposeViewController簡単。"];
[self presentViewController:twitterPostVC animated:YES completion:nil];
}
@taktamur
taktamur / TR-Basic Needs & RWS Patch_english_japanese.xml
Created April 29, 2013 12:12
Skyrim mod "Hellcommanders TR Basic Needs and RWS Patch"の日本語化ファイル 要TesVTranslator http://skyrim.2game.info/detail.php?id=15406
<?xml version="1.0" encoding="UTF-8"?>
<SSTXMLRessources>
<Params>
<Addon>TR-Basic Needs &amp; RWS Patch.esp</Addon>
<Source>english</Source>
<Dest>japanese</Dest>
</Params>
<Content>
<String List="0" Partial="1">
<Source>Hawk Breast Meat</Source>
@taktamur
taktamur / CampingKitNorthernRanger_english_japanese.xml
Created April 28, 2013 08:22
Skyrim mod "Camping Kit of the Northern Ranger" の日本語訳ファイル Version 1.5 http://skyrim.2game.info/detail.php?id=10573 の Version 1.5 日本語化 http://skup.dip.jp/up/up03895.zip をTesVTranslatorのファイルに変換しただけ。
<?xml version="1.0" encoding="UTF-8"?>
<SSTXMLRessources>
<Params>
<Addon>CampingKitNorthernRanger-en.esp</Addon>
<Source>english</Source>
<Dest>japanese</Dest>
</Params>
<Content>
<String List="0" Partial="1">
<Source>Chair</Source>
@taktamur
taktamur / Dogs-of-Skyrim_english_japanese.xml
Created April 28, 2013 06:40
Skyrim mod "Dogs of Skyrim" の日本語翻訳ファイル。要TesVTranslator http://skyrim.2game.info/detail.php?id=35008
<?xml version="1.0" encoding="UTF-8"?>
<SSTXMLRessources>
<Params>
<Addon>Dogs-of-Skyrim.esp</Addon>
<Source>english</Source>
<Dest>japanese</Dest>
</Params>
<Content>
<String List="0">
<Source>Guard Dog</Source>
@taktamur
taktamur / DAHMapBox.m
Created March 17, 2013 11:43
MKMapViewのKVOを利用して、初回1回だけ現在位置に 地図を移動させる。
// MKMapViewのlocationにaddObserverして、場所が更新されたら中心点に移動する。
// http://blog.syuhari.jp/archives/2035
[self.mapView.userLocation addObserver:self forKeyPath:@"location" options:0 context:NULL];
}
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
self.mapView.centerCoordinate = self.mapView.userLocation.location.coordinate;
// 一度しか現在地に移動しないなら removeObserver する
[self.mapView.userLocation removeObserver:self forKeyPath:@"location"];
}
@taktamur
taktamur / DAHAppDelegate.m
Created March 17, 2013 11:11
DCIntrospect起動 iOSエミュレータでViewのサイズ表示、スペースで起動
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// DCIntrospectはエミュレータでViewの各サイズを表示してくれるユーティリティ
// pod 'DCIntrospect'
#if TARGET_IPHONE_SIMULATOR
[[DCIntrospect sharedIntrospector] start];
#endif
return YES;
}
@taktamur
taktamur / SenTestCase+PAMColor.h
Created January 27, 2013 14:09
XCodeのUnitTestで、Failを赤く表示する ref: http://qiita.com/items/e0be611627e38835aa74
//
// SenTestCase+PAMColor.m
// PAMColorUnitTest
//
// Created by 田村 孝文 on 2013/01/27.
// Copyright (c) 2013年 田村 孝文. All rights reserved.
//
#import "SenTestCase+PAMColor.h"
#import <objc/runtime.h>
@taktamur
taktamur / ZEViewController
Created January 19, 2013 17:01
タイル状のUIViewを動かしてみる ref: http://qiita.com/items/1b2128cfe32f5e2afe22
#import "ZEViewController.h"
#import <QuartzCore/QuartzCore.h> // layer.shadowXXXを使うために。
@interface ZEViewController ()
@end
@implementation ZEViewController
@taktamur
taktamur / gist:4570900
Created January 19, 2013 05:13
XCodeのDashプラグインをインストールする方法のメモ

Dashは軽くて早いリファレンスビュアーです。これをXCodeから使えるようにするプラグインがあったのでそれを入れてみます。

mba% git clone git://github.com/omz/Dash-Plugin-for-Xcode.git
mba% open Dash-Plugin-for-Xcode
# XCodeでビルド
mba% ls ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/OMQuickHelp.xcplugin/
# 矢印が出来てることを確認
# XCodeを再起動