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
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
#include <stdio.h> | |
#include <android/log.h> | |
#include "calvals.h" | |
#define EXPORT __attribute__((visibility("default"))) | |
#define LOG_TAG "native" | |
#define log_info(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__) | |
#define log_error(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__) |
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
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
#!/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
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
#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
githubへ登録 | |
=========== | |
git remote add origin git@github.com:<username>/<application_name>.git | |
git push origin master | |
初期設定 | |
======= | |
git config --global user.name "Foo Bar" | |
git config --global user.email "foo@bar.com" |
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" |
NewerOlder