2012-01-01から1年間の記事一覧

checkinstall を使ってtar.gzをインストールしつつdeb

tar.gzを展開make (make install しないで) rootで checkinstallインストールしつつdebパッケージができる

djangoでsqliteから他のデータベースに移行するなら

sqlを吐き出して、mysqlに流し込もうとするなら、テーブルが、""でくくられていることと、 デフォルトだとカラム名が出力されないので、形式によっては、明示的になんとかしたほうがよいのではないか 特にidを指定していないときなど??

django simple history を使っているときのdumpdata, loaddata

dumpdataしてloaddataすると loaddataしたときに、今までのヒストリ+今回インストールしたことによるヒストリができるようなので、注意したほうがよさそうなときもあるのではないか。

[django][jenkins] django-jenkins のオプションについて

いくつかオプションがあるようだ。 たしかこんなかんじ。 python manage.py help jenkinsソースコードの具体的な場所を含めてcoverageの出力をhtmlでほしかったので しらべた。settings.pyをよみこむようにした、 jenkins-setting.py を用意して from settin…

speculative execution を false にする

投機的実行というのか、バックアップなのかで動く、同じタスクが複数実行されるのを抑制するとおもわれるオプション。 以下のものをfalseにする mapred.map.tasks.speculative.execution mapred.reduce.tasks.speculative.executionあとは、バックアップタス…

django tastypieで、postのテスト

from django.test import TestCase class SimpleTest(TestCase): jsonString = '{"name":"hello","country":"JPN"}' response = self.client.post('/api/v1/person/',data=jsonString, content_type='application/json') print "----" print response.conten…

tastypie のテストコード

https://github.com/toastdriven/django-tastypie/blob/master/tests/basic/tests/http.py connection = self.get_connection() post_data = '{"content": "A new post.", "is_active": true, "title": "New Title", "slug": "new-title", "user": "/api/v1/…

git で特定のブランチへ、pushする

git

ローカルにある、branch2をremote(origin)のbranch1へpushする。 git push origin branch2:branch1

git commit id などを、埋め込んでくれるmaven plugin

git attributes ident とか filter とかで、問題がないならいいのだが、 eclise のegitだと git attributes をサポートしていないようなので(357039 – EGit does not handle .gitattributes ident) javaなら GitHub - git-commit-id/maven-git-commit-id-plu…