CREATE TABLE `ext_log_entries` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`action` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
`logged_at` datetime NOT NULL,
`object_id` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
`object_class` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
{ | |
"meta": { | |
"type": "catalog" | |
}, | |
"products": { | |
"page": 1, | |
"limit": 60, | |
"pages": 33, | |
"total": 1971, | |
"facets": { |
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
// Create view | |
Posts.views.add("latest", function (terms) { | |
return { | |
options: {sort: {lastCommentedAt: -1}} | |
}; | |
}); | |
// Route controller | |
Posts.controllers.latest = Posts.controllers.list.extend({ | |
view: "latest" |
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
Posts.views.add("latest", function (terms) { | |
return { | |
options: {sort: {lastCommentedAt: -1}} | |
}; | |
}); | |
Posts.controllers.latest = Posts.controllers.list.extend({ | |
view: "latest" | |
}); |
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
# Install Nginx | |
brew install nginx | |
# Install Percona MySQL Server | |
# http://wizardmode.com/2012/06/apache-php-mysql-dev-on-os-x-lion-with-a-minimum-of-pain/ | |
brew install percona-server | |
# Install PHP | |
# https://gist.github.com/mystix/3041577 | |
brew tap josegonzalez/homebrew-php |
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 Hypebeast\Bundle\CoreBundle\Entity; | |
use Sylius\Component\Product\Model\OptionValue as BaseOptionValue; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity | |
* @ORM\Table(name="sylius_product_option_value") |
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
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAQAAABKmM6bAAAAGUlEQVQI12NggIL//xnQAclC/zEAAxWNBwBQ9SHf5PiMxgAAAABJRU5ErkJggg==) |
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
class WordpressPostVoter implements VoterInterface | |
{ | |
const VIEW = 'view'; | |
const EDIT = 'edit'; | |
protected $wordpressRegistry; | |
public function __construct(ManagerRegistry $wordpressRegistry) | |
{ | |
$this->wordpressRegistry = $wordpressRegistry; |
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 t(s,d){ | |
for(var p in d) | |
s=s.replace(new RegExp('{'+p+'}','g'), | |
typeof d[p][1]=='f' ? d[p]() : d[p]); | |
return s; | |
} | |
t("Hello {who}!", { who: "JavaScript" }); | |
// "Hello JavaScript!" | |
NewerOlder