gitolite-adminがpushできなくなってびびった

サーバーの自分のid_rsa.pubをそのままadminのキーとしていて、

 repo    gitolite-admin
            RW+     =   id_rsa

のまま登録していた。

サーバーで別ユーザーとしてテストしたかったので、id_rsa.pub を user1.pubとしてコピーして、keydirにおいてPushした。

で、問題発生

さらにconfを弄ってpushしようとしたら、user1ではpushできないよといわれて、修正できない。

ローカルの設定をかえてもpushしないことには設定は反映されないので
/var/lib/gitolite/.ssh/authorized_keysがあることに気づいた。*1

そこで、上から一致するところを見ているに違いないと思い、id_rsa.pubをつかっている行を一番上にもってきてみると、あっさりpushされた。

実験環境なので、とりあえずuser1もgitolite-adminが更新できるようにしたので、問題ないはず。

*1:debian squeezeでやってる

Playframeworkにてソースコードなしで動かすには app/viewsを残せばいい。

動くような状態にして、app/views 以外のフォルダを消す

play-1.2.3 java にて、リリースするときはソースコードをつけなくない場合があるのでどうすりゃいいんだという話。

これがたどり着いた結論。

簡単なサンプルつくってやってみただけなので、ほかにも残すべきフォルダがあるかもしれない

手順をまとめると

  1. 作ったフォルダを別名でコピーする
  2. コピーしたフォルダに対して play precompile コピーしたフォルダ
  3. コピーしたフォルダのapp以下をviewsだけ残して消す。
  4. play run コピーしたフォルダ --%prod -Dprecompiled=true で起動

でとりあえずうまくいく。

-Dprecompiled=trueをつけないと再度precompileが走ってしまうので必須。

調べたこと

やりかたが書いてないので、ここで聞けといわれているStackOverflowを探してみると

http://stackoverflow.com/questions/7847587/how-can-i-deploy-play-framework-application-standalone-no-war-and-not-include

という記事がみつかった。

質問者はエラーが出てるといっているけど、とりあえず手順をまねてみたら、同様のエラー。

あれこれ試してみたけど、テンプレートがないのならテンプレートだけ残せばいいんじゃない?といことでやってみたら動いた次第。

Scalaお勉強(1) Emacsの設定

Scalaのコードを書くためにEmacsの設定をしてみたもののつまずいたので、メモ

  1. http://code.google.com/p/yasnippet/ から yasnippet-0.6.1c.tar.bz2 を落としてきて適当なところに展開。
  2. scalaについているemacsのツールも移動しておいた
  3. 下記のように .emacs に追加
(add-to-list 'load-path "~/lisp/scala-mode")
(add-to-list 'load-path "~/lisp/yasnippet-0.6.1c")
(require 'yasnippet)
(require 'scala-mode-auto)
(setq yas/scala "~/lisp/yasnippet-0.6.1c/snippets")
(yas/load-directory yas/scala)
(add-hook 'scala-mode-hook
          '(lambda ()
             (yas/minor-mode-on)))

emacs sample.scala などとしてscalaコードを開いたのち、docとすると候補が開かれる

DELL Demension 8300 を SATA化した。

SISY2010-01-23

速度的にとても耐えられない状況だったので、いろいろ調べてみたら、DISKの読み取りエラーが多発していた。

いい機会なのでSATA化してみたので、そのメモ。結果元の2倍ぐらい早くなって、体感的にもとても満足いくものになった。

SSD化するとまだまだ使えそうな気がするけど、SSDってジャンパとかあるんだろうか

ざっと手順

  1. BOIS を A07にアップデート。
  2. SATAは1.5Gb/sしかサポートしてないらしいので、HDDのジャンパで設定。
    1. Seagateだと電源コネクタからみて外側二つをまたいで刺す。
  3. IDE接続をすべて外して、SATA一式を接続。
  4. ALT+Fして、BIOSをクリア。
  5. CapsLock PrintScreen NumLockをおしてキーボードのランプをすべて光らせてから、ALT+EとしてNVRAMをクリア。

設定を保存して終了すると再起動して、認識してくれているはず。

HGSTのドライブはジャンパがなく1.5Gbに落とせないらしいので、避けた方が無難らしい。

Ramディスクをつかってみた

メモリを増設してみると自宅作業だと常にあまり気味なので、RAMディスク化してみた。

もちろん、Gavotte Ramdisk まとめWIKI - トップページを参考にした。

ブラウザのキャッシュや、システムTMPを持って行っただけだけど、なかなか良くなった。

普段作業の中でのもっさりはどうもこのIDEドライブ(ATA100)のもっさりが影響してる気がするので、
せっかくだからSATA化してみようかな。

BUFFALO IFC-PCI7ESAU2 eSATA/SATA&USB2.0ボード

BUFFALO IFC-PCI7ESAU2 eSATA/SATA&USB2.0ボード

Eclipse で mercurial をつかう(5)

その他

パッチやインポートはちょっと保留。(4)までにまとめた作業以外は
コマンドがよさそうなので。

コマンドプロンプトでhelpをみてみると

E:\hgCentral\ppp> hg help
Mercurial Distributed SCM

list of commands:

 add          add the specified files on the next commit
 addremove    add all new files, delete all missing files
 annotate     show changeset information per file line
 archive      create unversioned archive of a repository revision
 backout      reverse effect of earlier changeset
 bisect       subdivision search of changesets
 branch       set or show the current branch name
 branches     list repository named branches
 bundle       create a changegroup file
 cat          output the current or given revision of files
 clone        make a copy of an existing repository
 commit       commit the specified files or all outstanding changes
 copy         mark files as copied for the next commit
 diff         diff repository (or selected files)
 export       dump the header and diffs for one or more changesets
 grep         search for a pattern in specified files and revisions
 heads        show current repository heads or show branch heads
 help         show help for a command, extension, or list of commands
 identify     identify the working copy or specified revision
 import       import an ordered set of patches
 incoming     show new changesets found in source
 init         create a new repository in the given directory
 locate       locate files matching specific patterns
 log          show revision history of entire repository or files
 manifest     output the current or given revision of the project manifest
 merge        merge working directory with another revision
 outgoing     show changesets not found in destination
 parents      show the parents of the working dir or revision
 paths        show definition of symbolic path names
 pull         pull changes from the specified source
 push         push changes to the specified destination
 recover      roll back an interrupted transaction
 remove       remove the specified files on the next commit
 rename       rename files; equivalent of copy + remove
 revert       restore individual files or dirs to an earlier state
 rollback     roll back the last transaction
 root         print the root (top) of the current working dir
 serve        export the repository via HTTP
 showconfig   show combined config settings from all hgrc files
 status       show changed files in the working directory
 tag          add one or more tags for the current or given revision
 tags         list repository tags
 tip          show the tip revision
 unbundle     apply one or more changegroup files
 update       update working directory
 verify       verify the integrity of the repository
 version      output version and copyright information

とまあ、盛りだくさん。

普段のコミットはGUIで、何か綿密に作業したければ、コマンドでってのはsvnなんかと同じかな。