This file contains 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
set :application, "app" | |
set :domain , "domain" | |
set :repository, "your repository" | |
set :slice_ip, '##.###.###.###' | |
# If you aren't deploying to /u/apps/#{application} on the target | |
# servers (which is the default), you can specify the actual location | |
# via the :deploy_to variable: | |
set :deploy_to, "/var/www/vhosts/#{domain}/htdocs" | |
set :document_root, "/var/www/vhosts/#{domain}/htdocs/current" |
This file contains 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
$this->_helper->viewRenderer->setNoRender(true); |
This file contains 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
<!-- Wrapper for a slate --> | |
<div id="<?=$this->id ?>" class="<?=$this->slate ?> slate-wrapper"> | |
<?=$this->content?> | |
<div> | |
<!-- 3 Slate List View --> | |
<? if ($this->slate == Kfx2_View_Helper_ThreeSlate::SLATE_BLANK ) : ?> | |
<? elseif ($this->slate == Kfx2_View_Helper_ThreeSlate::SLATE_ERROR) :?> |
This file contains 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
def self.find_scrabble_words ( letters ) | |
words = Array.new | |
(1..letters.size).each do |i| | |
letters.permutation(i).to_a.each{ | |
|word| words.push(word.join("")) | |
} | |
end | |
return self.find(:all, | |
:conditions => ["word in (?)", words.compact ], |
This file contains 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
class User_Model_User extends User_Model_Base_User | |
{ | |
const IS_ACTIVE_OFF = 0; | |
const IS_ACTIVE_ON = 1; | |
public static $isActiveFlag = self::IS_ACTIVE_OFF; | |
public function hook() |
This file contains 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
public function findLeadersBySchool($schoolId = 1, $limit = 3) | |
{ | |
return $this->findLeadersBaseQuery() | |
->leftJoin('u.Assignment_Assignee a ON u.id = a.assigned_entity_id ') | |
->addWhere('a.assigned_entity_type = ?', User_Model_Student::ENTITY_TYPE) | |
->addWhere('a.assignee_entity_type = ?', Plan_Model_Classroom::ENTITY_TYPE) | |
->addWhere('a.assignee_entity_id = ?', $schoolId) | |
//->limit($limit) | |
->execute(); | |
} |
This file contains 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
public function postUpdate($event) | |
{ | |
$profile = Zend_Registry::getInstance()->get("role"); | |
$currentRecord = $this->getTable()->find($event->getInvoker()->id); | |
$profile->steps = $profile->steps - $currentRecord->steps + | |
$event->getInvoker()->steps; | |
$profile->save(); | |
} | |
This file contains 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
require 'rubygems' | |
require 'active_record' | |
require 'robots' | |
dbconfig = YAML::load(File.open("db.yml")) | |
ActiveRecord::Base.establish_connection(dbconfig) | |
ActiveRecord::Base.logger = Logger.new(STDERR) | |
class DomainName < ActiveRecord::Base | |
end |
This file contains 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
grep '2010-02-17' error.log |
This file contains 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 clone git://github.com/ry/node.git | |
cd node | |
./configure | |
make | |
sudo make install |
OlderNewer