Skip to content

Instantly share code, notes, and snippets.

View gist:9119670
<?php
class GroupTrack_Auth_Adapter_DbTableBcrypt extends Zend_Auth_Adapter_DbTable
{
/**
* _authenticateCreateSelect() - This method creates a Zend_Db_Select object that
* is completely configured to be queried against the database.
*
* @return Zend_Db_Select
*/
@nclundsten
nclundsten / gist:9190859
Created Feb 24, 2014
load area of desktop in a window for hangouts/etc
View gist:9190859
ffmpeg -f x11grab -s 1920x1080 -r 2 -i :0.0+1366,0 -pix_fmt yuv420p -f rawvideo - | ffplay -f rawvideo -pixel_format yuv420p -video_size 1920x1080 -
View gist:9199914
<?php
namespace Authorize\Provider;
use BjyAuthorize\Provider\Role\ProviderInterface;
use BjyAuthorize\Provider\Role\Config;
class RoleProvider extends AbstractDbProvider implements ProviderInterface
{
protected $tableName = "group_roles";
View gist:9259710
<?php
return array(
'service_manager' => array(
'factories' => array(
'rbac_navigation' => 'Authorize\NavigationGroupsFactory',
'navigation_primary' => 'Zend\Navigation\Service\DefaultNavigationFactory',
'navigation_secondary' => 'Pledgevine\Navigation\Service\SecondaryNavigationFactory',
),
),
View gist:9259766
public function createGroupPage($groupId, $groupName, $groupPageTemplate = null, $groupPledgeCount = null)
{
$page = $groupPageTemplate ?: $this->groupPageTemplate;
$groupPledgeCount = ($groupPledgeCount !== null)
? $groupPledgeCount
: $this->getPledgeCountForGroupId($groupId);
$page['label'] = $groupName;
$page['name'] = $groupName;
$page['groupId'] = $groupId;
View gist:9311705
# from terminal:
sudo openssl req -new -x509 -nodes -out /etc/nginx/server.crt -keyout /etc/nginx/server.key
chmod 600 /etc/nginx/server.key
# add these lines in virtual.conf under "server":
listen 443 ssl;
server_certificate /etc/nginx/server.crt;
server_certificate_key /etc/nginx/server.key;
View gist:9555417
<?php
$form = new \Zend\Form\Form;
$form->setInputFilter($formFilter = new \Zend\InputFilter\InputFilter());
$fieldSet = new \Zend\Form\FieldSet;
$fieldSet->setName('subforms');
$subForm = new \Zend\Form\Form;
View gist:9603970
<script type="text/javascript">var switchTo5x=true;</script>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>;
<script type="text/javascript" src="http://s.sharethis.com/loader.js"></script>;
<script type="text/javascript">stLight.options({publisher: "a3bbd2cb-00a8-4400-8bd6-18f000fd7ea5", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script>
<script>
var options={ "publisher": "a3bbd2cb-00a8-4400-8bd6-18f000fd7ea5", "position": "left", "ad": { "visible": false, "openDelay": 5, "closeDelay": 0}, "chicklets": { "items": ["facebook", "twitter", "linkedin", "pinterest", "email", "sharethis"]}};
View gist:fe557d0be1bb392e0ced
<?php
namespace Subscription\Service;
use Zend\ServiceManager\ServiceLocatorAwareInterface;
use Zend\ServiceManager\ServiceLocatorAwareTrait;
class SubscriptionService implements SubscriptionInterface, ServiceLocatorAwareInterface
{
use ServiceLocatorAwareInterface;
View gist:f0054c67647ec27e9e83
<?php
namespace Subscription\Service;
use Zend\ServiceManager\ServiceLocatorAwareInterface;
use Zend\ServiceManager\ServiceLocatorAwareTrait;
class SubscriptionService implements SubscriptionInterface, ServiceLocatorAwareInterface
{
use ServiceLocatorAwareInterface;