Skip to content

Instantly share code, notes, and snippets.

;; フォントセット作成
(create-fontset-from-mac-roman-font
"-apple-m+ 2m-medium-r-normal--14-*-*-*-*-*-iso10646-1" nil "mplus")
(set-fontset-font "fontset-mplus" 'japanese-jisx0208
'("m+ 2m light" . "iso10646"))
(set-fontset-font "fontset-mplus" (cons (make-char 'japanese-jisx0208 #x30 #x20)
(make-char 'japanese-jisx0208 #x74 #x7f))
'("ヒラギノ角ゴ pro w3" . "jisx0208.1983"))
(set-fontset-font "fontset-mplus" 'katakana-jisx0201
'("m+ 1m light" . "iso10646"))
@mochiz
mochiz / caveatPatchor.js
Created October 21, 2011 08:31 — forked from phred/caveatPatchor.js
caveatPatchor.js with barebones oohembed (now embedly?!) support for Propane 1.1.2 and above
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
@mochiz
mochiz / app.js
Created March 1, 2012 16:18 — forked from oroce/app.js
Faking Long Touch on Android in Titanium Mobile
//The table view row just has to have a full height view in order
//to trigger the TableView touchstart
function LongTouchTableViewRow(_title) {
var row = Ti.UI.createTableViewRow({
height:50
});
var v = Ti.UI.createView({
height:50
});
@mochiz
mochiz / gist:2692611
Created May 14, 2012 08:03
Titanium x Androidでのハマりどころを思い出せるだけ
Titanium x Androidのハマりどころについて質問をもらったので、分かる範囲で共有させて頂きます。
私の調査不足ということもあるので、詳細はご自身でお調べいただければ幸いです。
あと、最後に確認したのが2012年3月頃だった気がするので、少し情報が古いかもしれません。
・機種依存でカメラが落ちるなど
Xperiaだったかしら?
独自のカメラAPIを使っている端末についてはカメラ撮影時にアプリが落ちるなどの不具合が発生します。
ちょちょいと対応できるものではないので、契約時に標準のカメラAPIが対応していない機種については対応しないor別途開発期間をもらうなどの同意をとっておく必要があるかと思います。
@mochiz
mochiz / gist:3045051
Created July 4, 2012 03:21 — forked from yagitoshiro/gist:3039968
Titanium Mobile用のSQLiteを扱うクラス・第二形態
# モデルがこれだけで作れたら素敵じゃないか
# entry.coffee
Database = require('libs/database')
class Entry extends Database
initialize:()->
@property 'title', 'text'
@property 'body', 'text'
super
module.exports = new Entry('entries')
@mochiz
mochiz / gist:3151584
Created July 20, 2012 16:05
Titaniumでアプリ名表記を変更する方法iOS+Android

Titaniumでアプリ名表記を変更する方法iOS+Android

2.1.0.GAで確認

iOSのアプリ名表記を変更

i18n/[ロケール]/app.xmlを用意する

# i18n/ja/app.xml    
@mochiz
mochiz / gist:3185796
Created July 27, 2012 02:05
rubyを毎日更新しよう

rubyを毎日更新しよう

$ brew link readline
$ ruby-build --definitions
$ CONFIGURE_OPTS="--with-readline-dir=/usr/local" rbenv install 1.9.3-p194
$ CONFIGURE_OPTS="--with-readline-dir=/usr/local" rbenv install 1.8.7-p358

$ brew unlink readline

@mochiz
mochiz / gist:4736183
Last active April 16, 2023 03:56
rbenvとruby-buildでRuby環境を最新に保つ

rbenvとruby-buildでRuby環境を最新に保つ

更新日:2014/11/19

rbenv, ruby-buildを更新

$ cd ~/.rbenv
$ git pull origin master
$ cd ~/.rbenv/plugins/ruby-build
$ git pull origin master
@mochiz
mochiz / gist:4753493
Last active December 12, 2015 09:39
モダンなiOS開発のための18のTips

モダンなiOS開発のための18のTips

2013/03/01更新

iOS Development Tips I Would Want If I Was Starting Out Todayの自分用メモ。

  • ARCを使う(Use ARC!)
  • 可能であればBlocksを使う(Prefer Blocks Where Possible)
  • ブロック利用時のRetainサイクルに注意する(Beware Of Retain Cycles With Blocks)
@mochiz
mochiz / gist:4757823
Last active December 12, 2015 10:19
GoogleAnalytics iOSマクロ *-Prefix.pch 等に実装します
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "GAI.h"
#endif
// GoogleAnalytics 初期化マクロ
// GA_INIT_TRACKER(@"UA***", 20);
#ifdef DEBUG
# define GA_INIT_TRACKER(ACCOUNT, PERIOD) { \