[Sublime Text 3] Package Control のインストール方法

Sublime Text 3 に Package Control をインストールしました。

git をインストール済みという前提で、下記のコマンドを実行します。

cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
git clone git://github.com/wbond/sublime_package_control.git Package\ Control
cd Package\ Control
git checkout python3

コマンドを全て実行後、Sublime Text 3 を再起動すれば、Package Control が使えるようになっているはずです。

[参考情報]

Install Package Control for Sublime Text 3 Beta

[Sublime Text] Package Control でインストールしてるパッケージ一覧

Sublime Text に Package Control でインストールしてるパッケージをメモ。(最終更新日:2013/08/07)

{
	"installed_packages":
	[
		"CoffeeLint",
		"CoffeeScript",
		"CoffeeScriptHaml",
		"Jade",
		"Nodejs",
		"Package Control",
		"Stylus",
		"SublimeLinter"
	]
}

[Mac] Homebrew でインストールしておくべきもの

Mac に Homebrew でインストールしておくべきものをリストアップしてみました。

grep や ack よりも ag でしょ!

brew install the_silver_searcher

ターミナルのスクリーン分割なら tmux !!

brew install tmux

diff を色付きで表示させる colordiff

brew install colordiff

.zshrc に diff を colordiff にエイリアスすると更に便利

alias diff='colordiff'

cmake

brew install cmake
brew install hub
brew install pstree
brew install tree
brew install wget

参考情報

にひりずむ::しんぷる – homebrew で最低限これだけはいれておけってやつ

[Mac] Node.js インストール中にエラー Build failed: -> task failed (err #2): {task: uv uv.h -> uv.a}

Xcode で Command Line Tools をインストールして、かつ、osx-gcc-installerをインストールしたら、Node.js がインストールできなくなった問題を解決した話をご紹介します。

続きを読む

[Mac] OpenSSL を Homebrew でインストール

Mac のデフォルトの OpenSSL を使わずに、Homebrew でインストールした OpenSSL を使うためのインストール手順をメモ。

デフォルトの OpenSSL を確認

% which openssl
/usr/bin/openssl
% openssl version

OpenSSL を Homebrew でインストール

% brew install openssl
% brew link openssl --force
% which openssl 
/usr/local/bin/openssl
% openssl version
OpenSSL 1.0.1e 11 Feb 2013

以上です。

[Mac] 開発環境のセットアップ手順メモ

Mac に開発環境をセットアップしたので、やったことと手順をメモ。

GCC をインストール
kennethreitz/osx-gcc-installer

[Mac] Homebrew をインストール(ついでにGitもインストール)

[Mac] zsh のインストール手順と設定メモ

[SSH] 秘密鍵を Dropbox にバックアップしつつ、シンボリックリンクを張って使えるようにする設定

$ ln -s ~/Dropbox/dotfiles/_gitconfig ~/.gitconfig

[Android] FILL_PARENT は非推奨(deprecated)なので MATCH_PARENT を使う(Android2.2以降)

Android アプリ開発にて、2.2以降 は FILL_PARENT は非推奨(deprecated)なので MATCH_PARENT を使うべきだそうです。

ただ、名前変更だけのリファクタリングらしいですが。

[参考]

Yukiの枝折: Android:match_parentとfill_parent

[Android] Crittercism でリアルタイムにクラッシュレポートを把握する

Android アプリに、リアルタイムにクラッシュレポートを把握できる「Crittercism」というサービスを導入しました。

Crittercism | Mobile Application Performance Management

無料版でも、充分使えてかなり助かってます。

今回は、公式ドキュメントに書かれている内容に自分で調べたメモを追加しました。

Crittercism – Installation Instructions

以下、実際に使ってるコードをメモ。

AndroidManifest.xml

<uses-permission android:name="android.permission.INTERNET"/>

READ_LOGS パーミッションについては、ユーザの半分以上が Android 4.1 以上の端末を使っていたので、付与しませんでした。

Android 4.1 以上での動作について Android 4.1 (Jelly Bean) 以上の端末では、この設定を行わなくてもリモート LogCat は機能します。一方、セキュリティ上の理由から、アプリ自身のプロセスから出力されたログ以外は、参照することができません。

[引用]:リモートLogCatの有効化 – DeployGate

MainActivity.java

initCrittercism メソッドは、onCreate メソッドから呼び出します。

import com.crittercism.app.Crittercism;
 
/**
 * Initialize Crittercism (Error reporting and monitoring tool.)
 * http://www.crittercism.com
 */
private void initCrittercism() {
    JSONObject crittercismConfig = new JSONObject();
    try {
        // include version code in version name
        crittercismConfig.put("includeVersionCode", true);
        // necessary for collecting logcat data on Android Jelly Bean devices.
        crittercismConfig.put("shouldCollectLogcat", true);
    } catch (JSONException je) {
    }
 
    Crittercism.init(getApplicationContext(), "<CRITTERCISM_APP_ID>", crittercismConfig);
}

proguard.cfg

proguard を使う場合は、下記の設定も追加しておきましょう。

-keep public class com.crittercism.**
 
-keepclassmembers public class com.crittercism.*
{
    *;
}

最後に、READ_LOGS パーミッションについてよく分からなくて、サポートに問い合わせた時の返信内容をメモ。

Hey,

I’ll try to give you a brief tour of this permission and how it interacts with Crittercism.

Crittercism does not require the READ_LOGS permission in order to function correctly. However, by enabling this permission (where applicable), it can provide additional useful information with every crash and exception report that Crittercism receives.

The Android API:

The logs permission functions in two very different ways depending on the version of the Android API. For versions 15 and lower, any access to the logs requires this permission, and its inclusion gives complete access to all log entries.

As you mentioned, such a global permission poses a potential security risk, and at the very least raises questions about data separation. For this reason, starting in Jelly Bean (API version 16 and higher), Google changed its policy about log access.

After the policy change READ_LOGS no longer works for API Level 16 and higher. With these versions, each app has access to log entries generated by the app itself.

To enable logcat collection for newer devices, you need to include the following code in the onCreate() method of your main activity:

// create the JSONObject. (Do not forget to import org.json.JSONObject!) 
JSONObject crittercismConfig = new JSONObject(); 
try 
{ 
crittercismConfig.put("shouldCollectLogcat", true); // send logcat data for devices with API Level 16 and higher 
} 
catch (JSONException je){}
 
Crittercism.init(getApplicationContext(), "<CRITTERCISM_APP_ID>", crittercismConfig);

Does that answer your questions? For further details, please refer to our documentation, here https://app.crittercism.com/developers/docs-android#including_logcat .

Best regards,

以上です。

[iOS] URL scheme の設定方法

iOS アプリの URLスキームの設定方法をメモ。

URLスキームの設定は下記のサイトを参考にしました。

iOSアプリにとりあえずでもカスタムURLスキームをつけるべし | Technology-Gym

URL Schemes の設定について ios iPhone xcode | Linux & App Labs By pt106

URLスキームでアプリを起動するだけでなく、アプリ起動&指定した動作をさせることもできます。

その際のパスやパラメータの定義は、FacebookアプリのURLスキームの定義が参考になってよさそうです。

IPhone URL Schemes – akosma wiki

以上です。

[Mac] Finder の環境設定メモ [2013年版]

Mac の Finder の環境設定をメモ。

finde_config1

finder-config2

finder-config3

以上です。