yum update -y
yum install openssh-clients
useradd daneko -g wheel
passwd daneko
visudo
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
<?php | |
require_once 'PHPUnit/Framework/TestCase.php'; | |
require_once 'vfsStream/vfsStream.php'; | |
// require_once 'hoge.php'; | |
/** | |
* ファイルシステムのテストに関してはURL参照 | |
* とりあえずざっくり使う方法メモ | |
* @see http://www.phpunit.de/manual/3.6/ja/test-doubles.html#test-doubles.mocking-the-filesystem.examples.ExampleTest.php |
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
''' | |
以下失敗事例 | |
''' | |
def reverseStr( param ): | |
''' | |
# 一見正しそうだけど「>>>」の後にスペースねぇと実行時に怒られる | |
>>>reverseStr('hoge') | |
'egoh' |
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
View#getLocalVisibleRect | |
そのViewの見えている部分のサイズのようだ | |
すなわちtop/leftはゼロ以外にはない | |
View#getLocationInWindow | |
View#getLocationOnScreen | |
完全に同じ値を返す。 | |
そのViewの始点がデバイスのスクリーン上のどこかを示す |
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
for i, hoge in enumerate(hogelist): | |
print i | |
#的なことをjinja2でやるとこうなる | |
{% for hoge in hogelist %} | |
{{ loop.index0 }} # 0オリジン | |
{{ loop.index }} # 1オリジン | |
{% endfor %} |
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
// https://github.com/ussy/sqlite-fixture 参考 | |
// @hideなので以下のようになる | |
Context getTestprojectContext( AndroidTestCase testProject){ | |
Method method = testProject.getClass().getMethod("getTestContext", new Class[0]); | |
return ((Context) method.invoke(testProject, new Object[0])); | |
} |
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
# /etc/nginx/conf.d/jenkins.conf サンプル | |
server { | |
listen 80; | |
server_name jenkins.3a3k.info; | |
# document root | |
location / { | |
proxy_pass http://localhost:8080; | |
} | |
} |
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://developer.android.com/sdk/index.html | |
http://d.hatena.ne.jp/isher/20100928/1285616799 | |
http://d.hatena.ne.jp/unagi_brandnew/20110908/1315420036 | |
# wget sdkのパス | |
# とりあえず /opt以下に展開 | |
# パスを通す | |
# android update sdk -u | |
# -u は guiなしで動作させるオプション | |
# android -h update sdk の出力は以下 |
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://confluence.jetbrains.net/display/SCA/Getting+Started+with+IntelliJ+IDEA+Scala+Plugin | |
homebrewでscalaを入れている場合は | |
/usr/local/Cellar/scala/2.9.1/libexec/ | |
がScalaのHomeになるはず(バージョンは適当で) |
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.cloudcore.jp/vps/faq/os/ubuntu/ | |
$ mkdir .ssh | |
$ chmod 700 .ssh | |
# id_rsa.pubをscpで .sshにup | |
$ mv .ssh/id_rsa.pub .ssh/authorized_keys | |
$ chmod 600 .ssh/authorized_keys |
OlderNewer