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
$viewModel = new ViewModel(); | |
$viewModel->setVariables( | |
array( | |
'reset_url' => $core->getCurrentSite() . "/reset/" . $reset_hash, | |
'ip_address' => $core::getIP(), | |
'promo_name' => $core->getPromotionName(), | |
) | |
); |
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 | |
/* | |
POST / HTTP/1.1 | |
Host: kinesis.<region>.<domain> | |
x-amz-Date: <Date> | |
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=content-type;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid, Signature=<Signature> | |
User-Agent: <UserAgentString> | |
Content-Type: application/x-amz-json-1.1 | |
Content-Length: <PayloadSizeBytes> |
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 | |
set_time_limit( 0 ); | |
$searchText = 'Page and Brin originally nicknamed THEIR new search engine "BackRub", because the system checked backlinks to estimate the importance of a site.'; | |
$start = microtime_float(); | |
for( $i = 0 ; $i < 1000000 ; $i++ ) | |
{ | |
preg_match_all("/[A-Z]{1}[a-zA-z]*/", $searchText, $matches ); |
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 fetchAllWithVotes() | |
{ | |
$resultset = $this->select( function( Select $select ){ | |
$sub = new Select( 'votes' ); | |
$sub->columns( array( 'total' => new Expression('COUNT(*)') ) ) | |
->where( 'songs.id = votes.song_id' ); | |
$select->columns( | |
array( |
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
$recaptcha = new Captcha\ReCaptcha(); | |
$recaptcha | |
->setOption( 'theme', $theme ) | |
->setPubKey( '6Ld-&hl='.$lang) | |
->setPrivKey( '6Ld-' ) | |
->setMessage( _( "Correctly repeat the text in the image, in the box beneath it" ) ); | |
$captcha = new Element\Captcha( 'captcha' ); | |
$captcha |
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
$sem->attach('Zend\Mvc\Application', MvcEvent::EVENT_ROUTE, function( MvcEvent $ev) use($sm,$em) { | |
$rm = $ev->getRouteMatch()->getMatchedRouteName(); | |
if( getenv("environment") === "master" && $rm == 'zfcuser' ) | |
{ | |
$ev->setRouteMatch( /* switch the route out here */ ); | |
} | |
}); |
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
$(document).ready( function(){ | |
if( $.cookie('welcome_register') ) | |
{ | |
// show the thanks div | |
$.removeCookie('welcome_register', { path: '/' }); | |
} | |
}); |
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 | |
namespace Application\Controller; | |
use Aws\DynamoDb\DynamoDbClient; | |
use Aws\DynamoDb\Enum\ComparisonOperator; | |
use Aws\DynamoDb\Enum\Type; | |
use Zend\Mvc\Controller\AbstractActionController; | |
use Zend\View\Model\JsonModel; | |
use Zend\View\Model\ViewModel; |
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
-webkit-box-shadow: 0px 0px 15px 3px rgba(50, 50, 50, 0.8); | |
-moz-box-shadow: 0px 0px 15px 3px rgba(50, 50, 50, 0.8); | |
box-shadow: 0px 0px 15px 3px rgba(50, 50, 50, 0.8); |
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
$("#sort").on('change', function( e ){ | |
var sort = $(this).val(); | |
$("div#collage").empty(); | |
$("div#collage").spin('show'); | |
$.get( '/redeem/sweeps/sort', { 'sort': sort }, function( data ){ | |
$("div#collage").html( data ); | |
Ladda.bind( 'button.ladda-button' ); | |
}); |
OlderNewer