複数人でgitレポジトリを共有する方法

sshを通してgitを利用する場合はgitを共有して利用するためのグループを作り, そのグループにパーミションを付与する.

管理側:
gitグループを追加
% sudo pw groupadd git
taroユーザを追加
% sudo adduser taro
taroユーザをgitグループに追加
% sudo pw usermod -n taro -G taro,wheel,git

ユーザ側:
% sudo mkdir hoge.git
% cd hoge.git
% sudo git init –bare –shared

% cd ..
% chgrp -R git hoge.git
% ls -l
drwxrwsr-x 7 root git 4096 6月 18 00:42 hoge.git

taro% mkdir hoge
taro% cd hoge
taro% git init
taro% git remote add origin ssh://taro@hogehoge.com/var/git/hoge.git #ローカルリポジトリに共有リポジトリを登録
taro% touch README
taro% git add .
taro% git commit -m “Initial import”
taro% git push origin master #共有リポジトリ(origin)にローカルリポジトリ(master)の更新を反映

参考:

続 せっかちな人のための git 入門 – 共有リポジトリの作り方 – 僕は発展途上技術者

学内ネットワークからftp接続する方法

学内から直接ftpで接続できないので, proxyを通して接続する.

~% ftp proxy.sras.sic.shibaura-it.ac.jp
Trying 202.18.118.128…
Connected to proxy.sic.shibaura-it.ac.jp.220- ocache01 PROXY-FTP server (DeleGate/9.9.7) ready.
220- @ @
220- ( – ) { DeleGate/9.9.7 (March 31, 2010) }
220- AIST-Product-ID: 2000-ETL-198715-01, H14PRO-049, H15PRO-165, H18PRO-443
220- Copyright (c) 1994-2000 Yutaka Sato and ETL,AIST,MITI
220- Copyright (c) 2001-2010 National Institute of Advanced Industrial Science a
nd Technology (AIST)
220- WWW: http://www.delegate.org/delegate/
220- –
220- You can connect to a SERVER by user' command:
220- ftp> user username@SERVER
220- or by
cd’ command (after logged in as an anonymous user):
220- ftp> cd //SERVER
220- Cache is enabled by default and can be disabled by cd .' (toggle)
220- This (proxy) service is maintained by 'goiken@sic.shibaura-it.ac.jp'
220-
220-extended FTP [MODE XDC][XDC/BASE64]
220
Name (proxy.sras.sic.shibaura-it.ac.jp:l08100): ftp@ftp.freebsd.org
331 Password required for ftp.
Password:
230-- PASS for ftp@ftp.freebsd.org.
220 ftp.beastie.tdk.net FTP server (Version 6.00LS) ready.
331 Guest login ok, send your email address as password.
230- Guest login ok, access restrictions apply.
230-- @ @
230 \( - )/ -- { connected to
ftp.freebsd.org’ }
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
229 Entering Extended Passive Mode (|||34337|)
150 Opening ASCII mode data connection for ‘/bin/ls’.
total 10
drwxrwxr-x 2 0 5 512 Jul 19 2007 .snap
drwx—— 2 0 0 2048 Jul 19 2007 lost+found
drwxr-xr-x 3 1006 1006 512 Sep 21 2009 pub
drwxr-xr-x 3 1006 1006 512 Jun 5 2007 sup
drwxr-xr-x 4 1006 0 512 Sep 18 2009 www
226 Transfer complete.
ftp>

<ユーザ名>@<接続先IP>で接続する. anonymous接続する場合はユーザ名にftpを指定するらしい.

参考URLにはGUIソフトでの設定もあるので,GUIソフトで繋ぎたい場合は要参照.

参考:

ftp プロキシサーバ

androidでipアドレスを調べる

androidの実機のipアドレスを調べる方法を示す. エミュレータは未確認.

基本的にadb shellのifconfigを使うのだが引数にインターフェース名を指定しないといけないらしい.

インターフェースの一覧を取得するには

~% adb shell ls /sys/class/net

lo
svnet0
usb0
sit0
eth0

とする. そして,

~% adb shell ifconfig eth0
eth0: ip 192.168.26.4 mask 255.255.255.0 flags [up broadcast running multicast]

とする.