Skip to content

Instantly share code, notes, and snippets.

View k1LoW's full-sized avatar
🦓

Ken’ichiro Oyama k1LoW

🦓
View GitHub Profile
@nojimage
nojimage / AppFixtureManager.php
Created February 21, 2012 03:53
テスト時に全テーブルのfixtureを自動で読み込む for CakePHP 2.0
<?php
App::uses('CakeFixtureManager', 'TestSuite/Fixture');
/**
* Fixtureの自動読み込み
*
* create to app/Lib/TestSuite/AppFixtureManager.php
*
* in TestCase
* $fixtures = array('IMPORT' => 'default');
@nojimage
nojimage / SomeTest.php
Created February 24, 2012 02:33
cakephp2でfixtureのテーブルだけ読み込んでデータは後読みしたいときの方法
class SomeTest extends CakeTestCase {
public $fixtures = array('some_table');
public function setUp() {
parent::setUp();
$this->fixtureManager->unload($this); // clear data all tables
}
public testSome() {
@ceeram
ceeram / .travis.yml
Created March 14, 2012 19:02
Travis configuration file for CakePHP, add to the root of the repo.
language: php
php:
- 5.3
- 5.4
env:
- DB=mysql
- DB=pgsql
- DB=sqlite
@slywalker
slywalker / Base64Email.php
Created March 16, 2012 09:00
メールの文字化けが怖いあなたに
<?php
App::uses('CakeEmail', 'Network/Email');
class Base64Email extends CakeEmail {
protected function _renderTemplates($content) {
$rendered = parent::_renderTemplates($content);
array_walk($rendered, function(&$val, $key) {
$val = base64_encode($val);
});
@matope
matope / NoSQLデータモデリング技法.markdown
Created April 16, 2012 03:35
NoSQLデータモデリング技法

#NoSQLデータモデリング技法

原文:NoSQL Data Modeling Techniques « Highly Scalable Blog

I translated this article for study. contact matope[dot]ono[gmail] if any problem.

NoSQLデータベースはスケーラビリティ、パフォーマンス、一貫性といった様々な非機能要件から比較される。NoSQLのこの側面は実践と理論の両面からよく研究されている。ある種の非機能特性はNoSQLを利用する主な動機であり、NoSQLシステムによく適用されるCAP定理がそうであるように分散システムの基本的原則だからだ。一方で、NoSQLデータモデリングはあまり研究されておらず、リレーショナルデータベースに見られるようなシステマティックな理論に欠けている。本稿で、私はデータモデリングの視点からのNoSQLシステムファミリーの短い比較といくつかの共通するモデリングテクニックの要約を解説したい。

本稿をレビューして文法を清書してくれたDaniel Kirkdorfferに感謝したいと思う

@rummelonp
rummelonp / faraday.md
Last active May 20, 2022 12:23
Ruby の HTTP クライアントライブラリ Faraday が便利そう

Ruby の HTTP クライアントライブラリ Faraday が便利そう

Ruby の HTTP クライアントライブラリ Faraday が便利そう

API ラッパの開発には [RestClient gem][rest_client_gem] だとか
OAuth の必要なものは [Net/HTTP][net_http] + [OAuth gem][oauth_gem] を使ってた

[Twitter gem][twitter_gem] や [Instagram gem][instagram_gem] など API ライブラリのソースを読んでみると
[Faraday gem][faraday_gem] というものがよく使われてた

@to
to / cache.manifest
Created June 28, 2012 14:24
Offline Application Cache on iOS 5
CACHE MANIFEST
NETWORK:
*
@PCreations
PCreations / youtube_controller.php
Created July 25, 2012 16:06 — forked from junichi11/youtube_controller.php
CakePHP Zend GData Youtube unlisted upload
<?php
class YoutubeController extends AppController{
public $name = 'Youtube';
public $uses = array();
public $layout = 'default';
public $components = array('Zend','Auth');
public function upload(){
$this->Zend->loadClass('Zend_Gdata_ClientLogin');
@magnars
magnars / goto-line-with-feedback.el
Created August 8, 2012 06:42 — forked from joshwnj/goto-line-with-feedback.el
Emacs: Show line numbers temporarily, while prompting for the line number input
;; turn line numbers off by default
(global-linum-mode -1)
(defun goto-line-with-feedback (&optional line)
"Show line numbers temporarily, while prompting for the line number input"
(interactive "P")
(if line
(goto-line line)
(unwind-protect
(progn
@hayajo
hayajo / changelog_en.md
Last active April 1, 2025 14:37
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形