Skip to content

Instantly share code, notes, and snippets.

import UIKit
import Ikemen
import NorthLayout
final class SearchTopSquareBannersView: UIView {
var didSelectItem: ((Int) -> Void)?
var viewHeight: CGFloat {
return sectionInsetTop + sectionInsetBotton + 2 * itemHeight + minimumSpacing
}
@kjsakata
kjsakata / BinaryType.php
Last active October 30, 2016 09:56
MySQL BLOB, GEOMETRY datatype add ZendFramework + Doctrine2
<?php
/**
* library/Doctrine/DBAL/Types/Mysql/BinaryType.php
*
* custome create binary type(mapping for mysql midiumblob type)
*
*/
namespace Doctrine\DBAL\Types\Mysql;
use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Platforms\AbstractPlatform;
@kjsakata
kjsakata / doctrine
Created December 17, 2011 22:12
doctirine2 console function add ZendFramework + Doctrine2
#!/usr/bin/env php
<?php
/**
* scripts/doctrine
*
* 1. generate annotation format metadata from database
* $ application/scripts/doctrine -v orm:convert-mapping --from-database annotation application/doctrine/Metadata --force
*
* 2. generate entities which has setter/getter by annotation format metadata
* ( @Entity(repositoryClass="Repositories\[RepositoryName]")
@kjsakata
kjsakata / Entitymanager.php
Created December 17, 2011 20:55
ZendFramework + Doctrine2 integration
<?php
/**
* library/Mylib/Resource/Entitymanager.php
*/
use Doctrine\DBAL\Types\Type;
class Mylib_Resource_Entitymanager extends Zend_Application_Resource_ResourceAbstract
{
/** setting value example
protected $_options = array(
'connection' => array(
@kjsakata
kjsakata / gist:1050653
Created June 28, 2011 07:06
centos5.6(64bit)のネットワークインストール手順
### centos5.6(64bit)のネットワークインストール手順
# 必要ファイルのダウンロード
1.http://ftp.iij.ad.jp/pub/linux/centos/5.6/isos/x86_64/
から
CentOS-5.6-x86_64-netinstall.iso
をダウンロード
# vmwareでのインストール開始
1.vmwareで上記ファイルから起動
参考-1) http://friendfeed.com/yungsang/48dfe3c4/centos-to-vmware-fusion