Skip to content

Instantly share code, notes, and snippets.

@nojimage
nojimage / phparray_grt.py
Created November 16, 2010 11:49
MySQL Workbench Plugin - Query to PHP Array Format
##
# MySQL Workbench - Query to PHP Array Format Plugin
#
# author: nojimage
#
# original: http://wb.mysql.com/?p=677 verticalquery_grt.py by Alfredo Kojima
##
# import the wb module
from wb import *
@markomarkovic
markomarkovic / compile_PHPUnit-3.5.15.sh
Created November 2, 2011 02:26
A script to compile PHPUnit-3.5.15 with all dependencies into archive which can be extracted to CakePHP 2.0 Vendor directory in order to UnitTest cake (if you don't have access to PEAR commands or PEAR insists on installing PHPUnit-3.6.0 and not working).
#!/bin/sh
# Creating temp dirs
mkdir .compile_PHPUnit_$$
cd .compile_PHPUnit_$$
# Fetching the archives
wget -nv http://pear.phpunit.de/get/PHPUnit-3.5.15.tgz
wget -nv http://pear.phpunit.de/get/DbUnit-1.0.0.tgz
wget -nv http://pear.phpunit.de/get/File_Iterator-1.2.3.tgz
@AKB428
AKB428 / readable_code.md
Last active February 10, 2024 08:10
リーダブルコード要約/Digest 「The Art of Readable Code」

リーダブルコード読書会及び要約共有会の目的

  • 今後コードレビュー時に「これってリーダブルコードの◯◯だよね?、こう直したほうがいいよね」と引用できレビューの時間の短縮化が実現できる。
  • リーダブルコードに登場する特殊ワードをチームのコーディングの共通語とする。デザインパターンのカタログ的な考え。
  • リーダブルコードを読んでない人も内容を短時間で把握できる。
  • チーム全体のコードを読みやすくメンテナンスしやすくし品質をあげる。
  • リーダブルコード教になりチーム以外にも広める。コードの品質が悪い人にはリーダブルコードの読書を進めてみる。ひどいコードのままコーディングしてもらうよりその時間を読書の時間に割り当てることも考える(結果的に時間が還元できるなら)。
  • リーダブルコードに書いてあることが全てのプロジェクトに適用てきるわけではないけれでもコーディングルールを考える際の指針にすることはできる。

対象者

@akihiromukae
akihiromukae / gist:288b163d538d45a197b3f1b54ef385e8
Last active August 29, 2020 05:47
wkhtmltopdfをAlpine linuxに入れてPDF出力する
まずはここのDockerfileを参考にするだけだとxvfbが足りなくて動かないので16行目に追加し、
https://github.com/LoicMahieu/alpine-wkhtmltopdf/blob/master/Dockerfile
以下のものも参考にdbusはdbusパッケージにあるdbus-genuuidを実行しておかないと、xvfb実行時にエラーになるので35行目に追加。
http://kernhack.hatenablog.com/entry/2016/05/28/101626
日本語ならIPAFontも入れると良いが、ググればすぐにでてくるので割愛。
これだけだと、CSSが効かない状態でPDF出力されるので別途対応が必要。ヘッドレスブラウザが必要?
FROM alpine:3.3
RUN apk add --no-cache \