タグ

ubuntuとdebianに関するkamipoのブックマーク (4)

  • oinume journal

    大規模なコードベースでリファクタリングを省エネ化するためにcodemodを最近調べていて、軽く試行錯誤したのでそのメモ。 やりたいこと 例えば以下のようなTable Driven TestなコードをBEFOREからAFTERに書き換えたい。コード量が多いため人間がやるのは現実的ではなく、codemodで機械的に書き換えたい。 BEFORE package main import ( "slices" "testing" ) func TestContains(t *testing.T) { type args struct { ss []string s string } tests := []struct { name string args args want bool }{ { name: "empty: false", args: args{[]string{}, ""}, wan

    oinume journal
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    kamipo
    kamipo 2009/12/16
    うっかり ubuntu の mysql パッケージをいれて消したりした場合、/etc/mysql/my.cnf がすでに存在していることがある。この場合、 --skip-bdb がないとか文句いわれる
  • Jumbo Frameの設定

    MTUを設定すればいいようです。 ifconfig 一時的な設定。再起動したら元に戻ります。9000までしか値が設定出来なかったのはNICの制限なのか、ifconfigの制限なのか……。 # ifconfig eth1 mtu 9000 # /etc/init.d/network restart /etc/network/interfaces NICの設定はここに書く。 # eth1 for static auto eth1 iface eth1 inet static address 192.168.xxx.2 network 192.168.xxx.0 netmask 255.255.255.0 broadcast 192.168.xxx.255 gateway 192.168.xxx.1 # Jumbo Frame設定 mtu 9000

    Jumbo Frameの設定
  • chkconfig (RedHat系) と sysv-rc-config (Debian系) - チラシの裏

    RedHat系にはランレベル毎のサービス起動スクリプトのON/OFFを調べる or ON/OFFを設定するchkconfigというコマンドがある。 てっきりLinux共通のコマンドだと思っていた。( ゜Д゜)ヒョエー どうやらRedHat系のコマンドだったらしい。知らなかった(無知全開) というわけで、Ubuntu(Debian系)でも同様のコマンドを探索。 意外と簡単に発見。 sysv-rc-conf というコマンドだそうな。 インストールは簡単。 $ sudo apt-get install sysv-rc-conf 使い方としては、基的にはchkconfigと一緒。 $ sudo sysv-rc-conf --list でランレベル毎の起動ON/OFFが出力される。 $ sudo sysv-rc-conf [service] on/off で起動のON/OFFが設定できる。 ついで

    chkconfig (RedHat系) と sysv-rc-config (Debian系) - チラシの裏
  • 1