自分で作ったり提供したりするものは、まず自分自身で使ってみろろということです。自分じゃ使わないものなら人はいくらでも無責任にも無思考にもなれる。そういう投げやりな「サービス」やら「プロダクツ」なんて、だれだってイヤだ。自分が作り手と同時に利用者の立場になれば、ちゃんと使えるレベルのものを提供しようとします。

2012年3月30日金曜日

起業ルート(中国語版)

アイデア生みから融資までの流れを表しますので、面白いです。

2012年3月28日水曜日

Android WebViewサンプル

Androidアプリでただブラウザー機能を提供して、リンク先は最適化したウェブサイトの仕組みです。

main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >
    <WebView
        android:id="@+id/webView1"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
</LinearLayout>

Android hostsファイル更新

adb root
adb remount
adb push XXXX /system/etc/hosts
adb push XXXX /etc/hosts

PS:
XXXXはローカルhostsファイルのパスです。
例:C:\hosts

2012年3月27日火曜日

Android基本入力フォーム

Android世界を挑戦し始めましたので、まずはAndroid基本入力フォームサンプルを作成する。

main.xml
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:stretchColumns="1"
>
    <TableRow>
        <TextView android:text="Name:" />
        <EditText android:id="@+id/name" />
    </TableRow>
    <TableRow>
        <TextView android:text="Address:" />
        <EditText android:id="@+id/addr" />
    </TableRow>
    <Button android:id="@+id/save"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Save"
    />
</TableLayout>

AndroidコマンドラインでHelloWorldを作成

プロジェクト作成
android create project --target "android-15" --path Skeleton/Koma --activity Koma --package com.sqlendia.android.skeleton

コンパイル
cd Skeleton/Koma
ant clean
ant debug

AVD起動
ant -Dadb.device.arg="-s emulator-5554" installd

アンインストール
ant -Dadb.device.arg="-s emulator-5554" uninstall

2012年3月16日金曜日

BitNami Redmineパッケージ

BitNami For Redmine
http://bitnami.org/ja/stack/redmine

バックアップ:
/home/lcadmin/redmine-1.3.1-0/mysql/bin/mysqldump -u bitnami -p bitnami_redmine > 20120316.sql

2012年3月15日木曜日

Linux監視コマンド

iostat
meminfo と free
mpstat
netstat
nmon
pmap
ps と pstree
sar
strace
tcpdump
top
uptime
vmstat
Wireshark

2012年3月8日木曜日

PostgreSQL Ubuntuでインストール(ソースから)

sudo apt-get install gcc
sudo apt-get install libreadline6-dev
sudo apt-get install zlib1g-dev
./configure
#sudo ln -s /usr/bin/make /usr/bin/gmake
sudo gmake
sudo gmake install
sudo adduser postgres
sudo mkdir /usr/local/pgsql/data
sudo chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test

Service Stop:
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data stop

自動起動
/etc/init.d/rc.localに下記の行を追加する
sudo su -l postgres -c "/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >> /home/postgres/dblog/logfile 2>&1 &"

(optional) change postgres user password,type: sudo passwd postgres
(optional) To start the server automatically at every boot, add: su -c ‘/usr/local/pgsql/bin/pg_ctl start -l /usr/local/pgsql/data/log/logfile -D /usr/local/pgsql/data’ postgres to your /etc/rc.local file

ホームページ