Skip to content

Instantly share code, notes, and snippets.

/*jshint evil:true */
'use strict';
angular.module('angular-password-strength', [])
.directive('passwordStrength', function() {
return {
require: 'ngModel',
link: function(scope, elm, attrs, ctrl) {
ctrl.$parsers.unshift(function(viewValue) {
<?php
namespace API\V1\Rest\HashTag;
use ZF\Apigility\Doctrine\Server\Resource\DoctrineResource;
class HashTagResource extends DoctrineResource
{
public function findByType($type) {
$collection = $this->getObjectManager()->getRepository('API\\V1\\Entity\\HashTag')->findBy(
@Hounddog
Hounddog / GruntFile.js
Created May 21, 2014 11:09
Protractor
// Generated on 2014-02-11 using generator-angular 0.7.1
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
@Hounddog
Hounddog / OauthUser.php
Last active August 29, 2015 14:01
Composite key
<?php
namespace API\V1\Entity;
use Doctrine\ORM\Mapping AS ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @package Model
* @version
$entityClass = $this->getEntityClass();//API\V1\Entity\Site
$entity = new $entityClass;
$hydrator = $this->getHydrator();//DoctrineModule\Stdlib\Hydrator\DoctrineObject
$hydrator->hydrate((array)$data, $entity);
//data
object(stdClass)#658 (2) {
["id"]=>
string(7) "testing"
["userId"]=>
return array(
'doctrine' => array(
'fixtures' => array(
'ModuleName_fixture' => __DIR__ . '/../src/Page/Fixture',
),
),
);
print_r($options['doctrine']['fixtures']);
@Hounddog
Hounddog / IndexController
Created November 26, 2013 20:27
Controller For Callback Controller of instagram
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
namespace HdInstagram\Controller;
@Hounddog
Hounddog / templatemap_generator.php
Created November 29, 2012 13:51
Template Map Generator
#!/usr/bin/env php
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@Hounddog
Hounddog / update.sh
Created November 28, 2012 13:14
deployment script
#!/bin/sh
#copy this script to the installation folder of the v5
#
# Create new Release
# ./update.sh release /path/to/release;
#
# Update existing Clients
# ./update.sh update /path/to/release /path/to/build.properties;
#
# Setup new Release Structure
@Hounddog
Hounddog / jGridViewHelper.php
Created October 26, 2012 20:20
JGrid Logic
<?php
namespace Application\View\Helper;
use Zend\View\Helper\AbstractHelper;
use Zend\View\Model\ViewModel;
use Zend\ServiceManager\ServiceManagerAwareInterface;
use Zend\ServiceManager\ServiceManager;
class JGridView extends AbstractHelper implements ServiceManagerAwareInterface