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
angular.module('modelService', ['ngResource']).factory('ModelService', function ($resource) { | |
return $resource( | |
'/supermodlr/api/:model_name/:action/:pk_id', | |
{ model_name:'@model_name', action : '@action', pk_id: '@pk_id' }, | |
{ | |
'create': { method: 'POST', params: { action: 'create' } }, | |
'read' : { method: 'GET', params: { action: 'read' }, isArray: false }, | |
'update': { method: 'POST', params: { action: 'update' } }, | |
'delete': { method: 'POST', params: { action: 'delete' } }, | |
'query' : { method: 'GET', params: { action: 'query', q: '@query' }, isArray: true } |
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
#!/bin/bash | |
regex='^[A-Z]{2,6}-[0-9]{1,8}\s' | |
message="$(sed 's/^#.*//' $1 | grep -v '^$')" | |
if [[ $message =~ $regex ]] ; then | |
echo -e >&2 "\e[0;32mCommit linked issue\e[m ${BASH_REMATCH[0]}" | |
else | |
echo -e >&2 "\e[0;31mCommit failed: Invalid JIRA Key: $message\e[m" | |
exit 1 | |
fi |
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
function armory_scrape($realm, $character) | |
{ // Scrape armory url based on provided realm and character information | |
$realm = sanitize_xml(strtolower($realm)); | |
$character = sanitize_xml(strtolower($character)); | |
$armoryurl = "http://us.battle.net/wow/en/character/$realm/$character/advanced"; | |
$debug = false; | |
function scrape($armoryurl) | |
{ // Get Armory Page |
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 Cygnus\CoreBundle\Composer; | |
use Composer\Script\Event; | |
use Sensio\Bundle\GeneratorBundle\Manipulator\KernelManipulator; | |
class ScriptHandler | |
{ |
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 TestClass { | |
public function getSomething() | |
{ | |
$array = array( | |
'A', | |
'B', | |
); |
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 Foo\BarBundle\Listener; | |
use Doctrine\Common\EventSubscriber; | |
use Doctrine\ODM\MongoDB\Events; | |
use Doctrine\ODM\MongoDB\Event\LifecycleEventArgs; | |
use Doctrine\ODM\MongoDB\DocumentManager; | |
use Doctrine\ODM\MongoDB\Mapping\ClassMetadataFactory; | |
use Doctrine\ODM\MongoDB\Types\Type as MongoType; |
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 MyTestClass | |
{ | |
private $privateVar = array(); | |
protected $protectedVar; | |
public $publicVar; | |
public static $staticVar = 'boom.'; | |
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 | |
require 'vendor/autoload.php'; | |
use OpenCloud\OpenStack; | |
use OpenCloud\Common\Service\CatalogService; | |
use OpenCloud\Common\Service\Endpoint; | |
use OpenCloud\Common\Exceptions; | |
use Guzzle\Http\ClientInterface; | |
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
// Rackspace |
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 Cygnus\CoreBundle\Loader; | |
use Symfony\Component\HttpFoundation\RequestStack; | |
use Cygnus\CMSBundle\API\Resource\AccountResource; | |
use Symfony\Component\HttpKernel\Event\GetResponseEvent; | |
/** | |
* Creates a Doctrine connection from predefined attributes | |
*/ |
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 Cygnus\Foo | |
interface ImportSourceInterface | |
{ | |
public function loadExternalData(); | |
public function format(); |
OlderNewer