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 | |
/** | |
* GetMessages | |
* | |
* @author Eric Clemmons ([email protected]) | |
* @category Zend | |
* @package Zend_View | |
* @subpackage Helper | |
* |
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
-- @last = the very last response | |
SELECT @last:=UNIX_TIMESTAMP(response_date) FROM responses GROUP BY response_date DESC LIMIT 1; | |
-- @diff = how much time has passed since the last response | |
SELECT @diff:=(UNIX_TIMESTAMP() - @last); | |
-- Add the date difference to all responses to chronologically bring them up to date | |
UPDATE responses SET response_date=FROM_UNIXTIME(UNIX_TIMESTAMP(response_date) + @diff); |
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 persistData($namespace = 'My_Super_Awesome_Form') | |
{ | |
if (null === $this->_session) { | |
$this->_session = new Zend_Session_Namespace($namespace); | |
} | |
if ($this->_session->values) { | |
$this->populate($this->_session->values); | |
} | |
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 | |
class Forms_Log_Writer_Backlog extends \Zend_Log_Writer_Mail | |
{ | |
/** | |
* Array of all events sent to writer, unfiltered. | |
* | |
* @var 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
body { | |
background: #000; | |
color: #ddd; | |
} | |
#jqt a > img { | |
border: none; | |
} | |
div#jqt > * { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<title>{{ page.title }} — CollegeDegrees.com</title> | |
</head> | |
<body> | |
{{ content }} |
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
#!/usr/bin/env bash | |
echo "Checking out master branch" | |
git checkout master | |
git pull origin master | |
git log master..develop | |
read -p "Review your changes..." | |
echo "Merging develop branch" |
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 | |
// Assumes you've installed via PEAR doctrine-common & doctrine orm/odm | |
use Doctrine\Common\ClassLoader, | |
Doctrine\Common\Annotations\AnnotationReader, | |
Doctrine\ODM\MongoDB\DocumentManager, | |
Doctrine\ODM\MongoDB\Mongo, | |
Doctrine\ODM\MongoDB\Configuration, | |
Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver; |
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
// README: https://github.com/ericclemmons/de-pagify | |
// | |
// Step 0 - Visit http://news.ycombinator.com/ | |
// Step 1 - Inject jQuery (http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet) | |
// Step 2 - Inject De-Pagify (https://github.com/ericclemmons/de-pagify/raw/master/bookmarklet.jquery.min.js) | |
// Step 3 - Run the following in the console: | |
jQuery('td > table:eq(1)').depagify('td.title:last a', { | |
filter: 'tr', | |
threshold: 'td.title:last a', |
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 | |
// This is the revised `web/app.php` (click the previous edit of this gist to see the original) | |
// | |
// For those of us that deploy along-side Zend Framework apps, whose convention has been to pivot configuration | |
// around APPLICATION_ENV, `web/app.php` and `web/app_dev.php` is redundant. | |
require_once __DIR__.'/../app/bootstrap.php.cache'; | |
require_once __DIR__.'/../app/AppKernel.php'; | |
//require_once __DIR__.'/../app/bootstrap_cache.php.cache'; |