Skip to content

Instantly share code, notes, and snippets.

View hidakatsuya's full-sized avatar
🏡
Working from home

Katsuya HIDAKA hidakatsuya

🏡
Working from home
View GitHub Profile
@hidakatsuya
hidakatsuya / thinreports
Created January 20, 2019 07:24
New Object Structure of thinreports-generator
item/
style/
base.rb
basic.rb
graphic.rb
text.rb
text_formatter/ (text_block/formatter/*)
basic.rb
datetime.rb
number.rb
@hidakatsuya
hidakatsuya / list_line_height.rb
Last active November 25, 2018 17:04
List line-height each font with prawn
require 'prawn'
fonts = [
['Helvetica', 'Agj'],
['Courier', 'Agj'],
['Times-Roman', 'Agj'],
['fonts/ipag.ttf', 'Agjぽ'],
['fonts/ipagp.ttf', 'Agjぽ']
]
$ docker system df
$ docker system prune (only <none>)
$ docker system prune -a
$ docker volume prune (-a)
@hidakatsuya
hidakatsuya / how-to-change-shell
Last active August 4, 2016 17:52
Change SHELL
$ sudo chsh -s /bin/bash <username>
@hidakatsuya
hidakatsuya / code.rb
Last active July 10, 2016 10:05
Code for Concept Thinreports v1.0
require 'thinreports'
report = Thinreports::Report.new
user = User.find(params[:id])
report.layout 'estimate_cover.tlf'
report.start_new_page do |page|
page.item(:subtitle).value = "#{@user.name} 様"
@hidakatsuya
hidakatsuya / thinreports-php-addPage-API.md
Last active September 7, 2015 08:02
Report#addPage でレイアウトファイルを指定するときの仕様案

はじめに

これは thinreports-php の v0.8.0 で実装される複数レイアウト機能の API の仕様案。 以下の仕様を踏まえて「ver-A.php」「ver-B.php」のどちらの案が良いか検討。

仕様

複数ファイルの仕様

  • Thinreports\Report のコンストラクタで指定されたレイアウトは、デフォルトレイアウトとなる
@hidakatsuya
hidakatsuya / composer.json
Last active November 23, 2015 12:17
Pure-PHP で帳票とか PDF を作成する ref: http://qiita.com/hidakatsuya/items/05eaae740f1523a87685
{
"require": {
"thinreports-php/thinreports-php": "@alpha"
}
}
@hidakatsuya
hidakatsuya / setup.md
Created July 15, 2015 18:05
db:migrate しない Rails アプリでテスト DB を準備する
$ rake db:schema:dump
$ rake db:test:prepare
@hidakatsuya
hidakatsuya / gist:d69c0f23c1e941b5cfe2
Last active November 19, 2018 13:55
Installing PHP with phpenv on Mac
$ brew install libmcrypt
$ brew install php56
$ brew tap josegonzalez/homebrew-php
$ brew install phpenv
$ git://github.com/CHH/php-build.git ~/.phpenv/plugins/php-build
$ vi ~/.bash_profile
# phpenv
export PATH=$HOME/.phpenv/bin:$PATH
@hidakatsuya
hidakatsuya / list-of-problem.md
Last active August 29, 2015 14:17
Problem of thinreports-generator internal
  • Shape::Interface/Internal な実装(分ける必要なし)
  • Shape::List の実装が全体的にダメ
  • Report::Base.generate の引数が混沌としすぎ generator: {}, report: {}