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
$ch = curl_init(); | |
curl_setopt( $ch, CURLOPT_URL, $centralUrl ); | |
curl_setopt( $ch, CURLOPT_FAILONERROR, 1 ); | |
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 ); | |
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ); | |
curl_setopt( $ch, CURLOPT_TIMEOUT, 3 ); | |
curl_setopt( $ch, CURLOPT_POST, true ); | |
curl_setopt( $ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC ); | |
curl_setopt( $ch, CURLOPT_USERPWD, $authString ); |
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 entry_id, DATEDIFF(from_unixtime(field_id_162, '%Y-%m-%d'), from_unixtime(field_id_267, '%Y-%m-%d')) as days, CONVERT_TZ(from_unixtime(field_id_267, '%m/%d/%Y %h:%i %A'), 'GMT', 'CST') as start, from_unixtime(field_id_162, '%m/%d/%Y %h:%i %A') as end FROM exp_channel_data Where field_id_162 != '' AND field_id_729 != '' AND field_id_267 BETWEEN UNIX_TIMESTAMP('2015-01-01') AND UNIX_TIMESTAMP('2015-02-12') |
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 :test_log, "logs/capistrano.test.log" | |
namespace :deploy do | |
before 'deploy:update_code' do | |
puts "--> Running tests, please wait ..." | |
unless system "bundle exec rake > #{test_log} 2>&1" #' > /dev/null' | |
puts "--> Tests failed. Run `cat #{test_log}` to see what went wrong." | |
exit | |
else | |
puts "--> Tests passed" |