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
| // 1.2 | |
| $html->link('Bakery', 'http://example.com')); | |
| // 1.3 | |
| $this->Html->link('Cafe', 'http://example.com'); |
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
| // 1.2 | |
| $javascript->link('cool_motion.js', true); | |
| // 1.3 | |
| $this->Html->script('more_cool_motion.js', true); |
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
| tell application "Terminal" | |
| activate | |
| end tell |
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 catchEvent(eventObj, event, eventHandler) { | |
| if (eventObj.addEventListner) { | |
| eventObj.addEventListner(event, eventHandler, false); | |
| } else if (eventObj.attachEvent) { | |
| event = 'on' + event; | |
| eventObj.attachEvent(event, eventHandler); | |
| } | |
| } | |
| function cancelEvent(event) { |
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
| git filter-branch --commit-filter ' | |
| if [ "$GIT_COMMITTER_NAME" = "OLD_NAME" ]; | |
| then | |
| GIT_COMMITTER_NAME="NEW_NAME"; | |
| GIT_AUTHOR_NAME="NEW_NAME"; | |
| GIT_COMMITTER_EMAIL="NEW_EMAIL"; | |
| GIT_AUTHOR_EMAIL="NEW_EMAIL"; | |
| git commit-tree "$@"; | |
| else | |
| git commit-tree "$@"; |
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 | |
| /** | |
| * APS Push Script without any Library. | |
| * | |
| * useage | |
| * 1. create cert (catenate no-pass key and cert with em format) | |
| * 2. edit path to your cert, device token and properties. | |
| * 3. run script. | |
| * | |
| * if you want to get device token of you app, |
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
| ul#categories | |
| width: 540px | |
| list-style: none | |
| margin: 15px auto 5px | |
| padding: 10px | |
| border: dotted 1px #cccccc | |
| li | |
| display: inline | |
| padding: 5px | |
| li.selected |
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
| ul#categories | |
| width: 540px | |
| list-style: none | |
| margin: 15px auto 5px | |
| padding: 10px | |
| border: dotted 1px #cccccc | |
| li | |
| display: inline | |
| padding: 5px | |
| li.selected |
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
| #!/usr/bin/env ruby | |
| # -*- coding: utf-8 -*- | |
| require 'tempfile' | |
| file = ARGV.shift | |
| temp = Tempfile.new('sub', '/tmp') | |
| File.open("#{file}", "r") { |f| |
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 | |
| public function hoge() { | |
| $User= ClassRegistry::init('User'); | |
| $id = 2; | |
| // subQuerie | |
| $conditionsSubQuery['`User2`.`id`'] = $id; | |
| $dbo = $User->getDataSource(); | |
| $subQuery = $dbo->buildStatement(array( | |
| 'fields' => array('`User2`.`group_id`'), |