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
gem 'devise' | |
gem 'simple_form' | |
gem 'haml-rails' | |
gem 'nifty-generators' | |
gem 'faker', :group => [:development, :test] | |
gem 'factory_girl_rails', :group => [:development, :test] | |
gem 'webrat', :group => :test | |
run "bundle install" |
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
#define _GNU_SOURCE | |
#include <stdio.h> | |
#include <pthread.h> | |
#include <sched.h> | |
#include <unistd.h> | |
#include <sys/syscall.h> | |
#include <sys/types.h> | |
void puts_thread_scheduling(char *who) | |
{ |
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
c = ->(arr, *fs){ | |
arr.map{ |v| f = fs.empty? ? ->n{n} : fs.shift; Array(v).map(&f) } | |
} | |
p c.([[1,2],[3,4]], ->n{n+1}, ->n{n+1}) #=> [[2, 3], [4, 5]] | |
p c.([[1,2],[3,4]], ->n{n+1}) #=> [[2, 3], [3, 4]] | |
p c.([[1,2],[3,4]]) #=> [[1, 2], [3, 4]] | |
p c.([1,2], ->n{n+1}, ->n{n+1}) #=> [[2], [3]] |
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
#!/bin/sh | |
echo "Running test ..." | |
for i in test/*_test | |
do | |
echo [ $i ] =========================== $'\n' | |
if [ -e $i ] ; then | |
if ./$i ; then | |
echo "" |
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
AVDの作成 | |
========= | |
android create avd -n <仮想デバイス名> -t <ターゲットID> [-<option> <value>] ... | |
example: | |
android create avd -n avd_t8 -t 8 | |
AVDの削除 | |
======== | |
android delete avd -n <仮想デバイス名> |
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
Android仮想デバイスエミュレータとAndroid Dev Phoneに関するデバイス情報 | |
Androidエミュレータ(AVD)には数社(Sony, SHARP, HTCなど)があるが、Google標準のもの示す。 | |
また、開発者向けにSIMロックフリーのAndroid Dev Phoneというものがある。 | |
現在Android Dev Phone 1, 2, 3(注:3でもAndroid 2.2なので古い)があり、HTCのNexusシリーズをAndroid Marketで購入する。 | |
現在出回っている最新のAndroid 端末と言われるものの7割弱にSnapDragonが採用されているため、SoCスペックはSnapDragon | |
と思えばいい。 | |
http://www.qualcomm.com/snapdragon/specs |
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
void android_main(struct android_app *state) | |
{ | |
app_dummy(); | |
{ | |
AAsset *asset; | |
uint8_t buf[1024]; | |
log_info("activity: %p\n", state->activity); | |
log_info("activity.assetManager %p", state->activity->assetManager); | |
asset = AAssetManager_open(state->activity->assetManager, "Summer.mp3", AASSET_MODE_UNKNOWN); |
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
$ git clone git://android.git.kernel.org/platform/prebuilt.git | |
$ emulator-arm -kernel ./prebuilt/android-arm/kernel/kernel-qemu-armv7 -avd avd_t15 -qemu -cpu cortex-a8 | |
Run Dev Tool | |
$ cat /proc/cpuinfo |
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://www.busybox.net/ | |
make menuconfig | |
make | |
make install | |
_install/ にバイナリができる | |
ターゲットが違う場合 | |
make CROSS_COMPILE=your-target-arch- |
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
-- これは何? | |
-- Mac OSXでウィンドウを左端、右端に移動するとディスプレイの半分のサイズにリサイズするAppleScriptだよ。 | |
-- Windows7にはAeroスナップってデフォルトでかっちょいいのがあるんだって、Macにはないよ。 | |
-- | |
-- どうすればいいの? | |
-- [システム環境設定]-[ユニバーサルアクセス]-[補助装置にアクセスできるようにする]をチェックする | |
-- [アプリケーション]-[ユーティリティ]-[AppleScriptエディタ.app]を起動 | |
-- これをコピー&ペースト | |
-- [ファイル]-[保存] | |
-- * ファイルフォーマットをアプリケーション |
OlderNewer