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
SELECT node.nid, | |
node.title as title, | |
portfolio_node.field_student_nid AS ind_nid, | |
student_node.field_firstname_value AS firstname, | |
student_node.field_lastname_value AS lastname, | |
student_node.field_image_2_fid AS ind_fid, | |
student_files.filepath AS ind_filepath, | |
portfolio_node.field_image_0_fid AS image_fid, | |
portfolio_files.filepath AS image_filepath, | |
video_files.filepath AS video_thumb_filepath, |
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
<?php if(strlen($this->item->introtext) < 400): ?> | |
<?php echo $this->item->introtext ?> | |
<?php else: ?> | |
<?php if(!empty($this->item->introtext)): ?> | |
<?php $fulltext_array = explode('</p>', $this->item->introtext); ?> | |
<?php else: ?> | |
<?php $fulltext_array = explode('</p>', $this->item->fulltext); ?> | |
<?php endif; ?> | |
<?php | |
if(strip_tags($fulltext_array[0]) == ' '){ |
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
$email = $request->getParameter('email'); | |
$user = Doctrine_Core::getTable('User')->getUser($email); | |
if($user) | |
{ | |
$validchars = array('0','1','2','3','4','5','6','7','8','9','a','b','c','d','f','g','h','j','k','m','n','p','q','r','s','t','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U',"V",'W','X','Y',"Z"); | |
$password = ''; | |
$i = 0; | |
while ($i < 8) { | |
$password .= $validchars[rand(0, count($validchars) - 1)]; | |
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
function weekly_matchups_current_week() | |
{ | |
$current_day = date('l'); | |
if ($current_day == 'Monday' || $current_day == 'Tuesday' || $current_day == 'Wednesday' || $current_day == 'Thursday' ) { | |
$current_week = date('W') - 1; | |
} | |
else | |
{ | |
$current_week = date('W'); |
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
function athlon_poll_preprocess_poll_results(&$variables) | |
{ | |
$poll_node = node_load($variables['nid']); | |
$variables['answer'] = $poll_node->answer['chanswer']; | |
$variables['template_files'][] = 'templates/poll-results-block'; | |
} |
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
TERM_PROGRAM=Apple_Terminal | |
TERM=xterm-color | |
SHELL=/bin/bash | |
TMPDIR=/var/folders/BW/BWy2QaX9Hla+vVEd6kc0ek+++TU/-Tmp-/ | |
Apple_PubSub_Socket_Render=/tmp/launch-4Ira0s/Render | |
TERM_PROGRAM_VERSION=273 | |
USER=steven.warren | |
COMMAND_MODE=unix2003 | |
SSH_AUTH_SOCK=/tmp/launch-zReIeb/Listeners | |
__CF_USER_TEXT_ENCODING=0x1F8:0:0 |
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
1 ## | |
2 # Host Database | |
3 # | |
4 # localhost is used to configure the loopback interface | |
5 # when the system is booting. Do not change this entry. | |
6 ## | |
7 127.0.0.1 localhost | |
8 127.0.0.1 it-mac | |
9 127.0.0.1 iphone | |
10 255.255.255.255 broadcasthost |
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
entries = Dir.entries("/Users/swarren/Sites/rails/devotional/public/images/covers") | |
rand(entries.count) |
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
Exception encountered: #<DRb::DRbConnError: too large packet 67645440> | |
backtrace: | |
/Users/swarren/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/drb/drb.rb:573:in `load' | |
/Users/swarren/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/drb/drb.rb:633:in `recv_reply' | |
/Users/swarren/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/drb/drb.rb:918:in `recv_reply' | |
/Users/swarren/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/drb/drb.rb:1197:in `send_message' | |
/Users/swarren/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/drb/drb.rb:1088:in `block (2 levels) in method_missing' | |
/Users/swarren/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/drb/drb.rb:1172:in `open' | |
/Users/swarren/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/drb/drb.rb:1087:in `block in method_missing' | |
/Users/swarren/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/drb/drb.rb:1105:in `with_friend' |
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
Scenario: visit a child page from a parent page | |
Given that "Chapel" site has a fixed page with slug "chapel" | |
And that "chapel" page has a child with slug "chapel-carving" and title "Last Supper Carving" | |
When I go to the chapel page on the chapel site | |
Then show me the page | |
And I follow "Last Supper Carving" | |
Then I should be on the chapel/chapel-carving page | |
And I should see "Last Supper Woodcarving" |
OlderNewer