This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* var */ my_zen_settings = { | |
'variables': { | |
'lang': 'ja', | |
'locale': 'ja-JP', | |
'charset': 'UTF-8', | |
'profile': 'xhtml', | |
'indentation': ' ', | |
'jquery_version': '1.5.0', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var menu = Editor.addMenu('my'); | |
addMenuItem(menu, { | |
name: 'text to unicode escape', | |
key: 'Ctrl+U', | |
action: function(){ Editor.currentView.text = toUnicodeEscape(Editor.currentView.text) } | |
}); | |
addMenuItem(menu, { | |
name: 'unicode escape to text', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'Zend/Gdata.php'; | |
require_once 'Zend/Gdata/ClientLogin.php'; | |
require_once 'Zend/Gdata/Spreadsheets.php'; | |
$user = ''; // GoodleアカウントのID | |
$pass = ''; // Googleアカウントのパスワード | |
$spreadsheet_key = ''; // スプレッドシートのキー(スプレッドシートのURLのkey部分) | |
$worksheet_id = 1; // ワークシートのID(インデックス。1-origin) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* jQuery placeholder fallback plugin (public domain) | |
* | |
* HTML5のplaceholderを実装していないブラウザでplaceholderの動作を模倣します。 | |
* .val()で値を設定するのを避け、<label>を生成して<input>/<textarea>上に被せます。 | |
* | |
* | |
* 使用例: | |
* $(function(){ | |
* $('input, textarea').placeholder(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// {app}/config/database.php | |
class DATABASE_CONFIG | |
{ | |
var $default = array( | |
// デフォルトのDB設定... | |
); | |
// https://github.com/cakephp/datasources を導入してArraySource用のDB設定を追加します。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // {app}/config/routes.php | |
/** | |
* Routes Configuration | |
* | |
* In this file, you set up routes to your controllers and their actions. | |
* Routes are very important mechanism that allows you to freely connect | |
* different urls to chosen controllers and their actions (functions). | |
* | |
* PHP versions 4 and 5 | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // {app}/models/user.php | |
// 1. usernameとpasswordフィールドを持つUserモデルを作成します。 | |
class User extends AppModel | |
{ | |
var $name = 'User'; | |
var $displayField = 'username'; | |
} | |
/* | |
CREATE TABLE users( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// http://developer.hatena.ne.jp/ja/documents/auth/apis/oauth/consumer#sample-ruby | |
require_once 'lib/limonade.php'; | |
require_once 'HTTP/OAuth/Consumer.php'; | |
session_start(); | |
function before(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* jQuery deserialize plugin | |
* public domain | |
* | |
* 使用例: | |
* $('form').deserialize('checkbox[]=1&checkbox[]=2&checkbox[]=3'); | |
* $('form').deserialize(location.search); | |
*/ | |
(function($){ | |
$.fn.deserialize = function(s, options){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* jQuery x plugin | |
*/ | |
(function($) { | |
var pluginName = ""; | |
var plugin = function(options) { | |
var settings = $.extend({}, plugin.defaults, options); | |
return this.each(function() { | |