Skip to content

Instantly share code, notes, and snippets.

View uebayasi's full-sized avatar

Masao Uebayashi uebayasi

  • Tombi Inc.
  • Yokohama, Kanagawa, Japan
View GitHub Profile

Setup

  • Figure out network configuration
    • Static IP
    • BOOTP-only
    • DHCP-only
    • BOOTP&DHCP
  • Configure
  • If BOOTP/DHCP
@uebayasi
uebayasi / gnucash-notes.md
Last active August 29, 2015 13:56
Notes on GnuCash

Japanese font setting for GnuCash on Windows

  • Edit %ProgramFiles%\gnucash\etc\pango\pango.aliaes

      tahoma = "Meiryo,tahoma"
      sans = "Meiryo,arial"
      serif = "Meiryo,times new roman"
      monospace = "Meiryo,courier new"
    

Goal

  • Run redmine (+ ruby 2.0.* + unicorn + nginx)
  • Using pkgsrc
  • With minimal rubygems disturbance

Preparation

@uebayasi
uebayasi / gnucash-tips-ja.md
Last active August 29, 2015 13:57
GnuCashに関する覚え書き
  • 勘定科目は少しずつ加える
    • 基本の5科目(純資産・資産・負債・収益・費用)から出発し、必要に応じて調べながら細分化する
    • 法人の場合、国税庁が定める分類を参考にする
  • 何年も一つのファイルを使い続ける
    • 年度・決算期が新しくなるときには、"Close Book"を実行する
      • さもないと、収益・費用が無限に大きくなる
  • Split Transactionを有効活用する
  • データ (*.gnucash) は圧縮なしで保存する
  • SSH
    • Add pubkeys to /etc/ssh/keys-root/authorized_keys and login as root@
  • Customization
    • Basically everything are cleared at boot even under /etc
  • ... modulo /etc/rc.local.d/local.sh
  • Follow http://wiki.prgmr.com/mediawiki/index.php/NetBSD_as_a_DomU#Unpacking_the_Installer
  • After unpacking /distros/netbsd64.tar.gz, replace kernels with a newer version
    • cd /mnt/boot
    • rm netbsd-*.gz
    • wget ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-6.1.3/amd64/binary/kernel/netbsd-XEN3_DOMU.gz
    • wget ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-6.1.3/amd64/binary/kernel/netbsd-INSTALL_XEN3_DOMU.gz
    • vi grub/menu.lst
      • Replace version numbers
  • Edit bind config files
    • Edit /etc/named.conf
      • Add view internal
        • Add match-clients
        • Add recursion yes
      • Add view external
    • Edit /etc/namedb/*
    • Create /etc/rndc.key
      • Run rndc-confgen -a -r keyboard
  • Edit /etc/rc.conf
  • Install
    • pkgin in dovecot-2
  • Configure
    • Basic
      • cd /usr/pkg/etc/dovecot
      • vi conf.d/10-mail.conf
        • mail_location = mbox:~/mail:INBOX=/var/mail/%u
    • SSL
      • vi dovecot-openssl.cnf
  • env SSLDIR=/etc/openssl sh mkcert.sh
  • Prepare ghc7 and (old) cabal
    • Install ghc7 from pkgsrc
    • Install cabal from pkgsrc-wip
  • Update cabal
    • cabal init
      • ^C
      • Nothing happens but default ${HOME}/.cabal/config is written
    • vi ${HOME}/.cabal/config
      • Uncomment user-install: True
  • cabal install cabal-install