Skip to content

Instantly share code, notes, and snippets.

<?php
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
/**
* @ODM\Document
*/
class Product
{
/**
>=dev-db/mongodb-1.8.2-r1 ~x86
>=dev-php5/pecl-mongo-1.2.0 ~x86
{% javascripts output="/js/instant.js" filter="coffee"
'@CaeferExperimentalBundle/Resources/js/mycupof.coffee'
%}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
// app/config/config.yml
assetic:
filters:
coffee:
bin: /usr/local/bin/coffee
node: /usr/local/bin/node
npm install -g coffee-script
curl http://npmjs.org/install.sh | sh
git clone --depth 1 git://github.com/joyent/node.git
cd node
git checkout v0.4.10
export JOBS=2
./configure
make
make install
echo 'export PATH=/usr/local/node/bin:$PATH' >> ~/.bash_profile
echo 'export NODE_PATH=/usr/local:/usr/local/lib/node_modules' >> ~/.bash_profile
source ~/.bash_profile
// scss syntax
table.hl {
margin: 2em 0;
td.ln {
text-align: right;
}
}
// compiles to this
table.hl {
_gaq.push(['first._trackPageview', (location.pathname+location.search).replace(/;/g, '-')]);
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="robots" content="noindex,nofollow" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['first._setAccount', 'UA-XXXXXX-X']);
_gaq.push(['first._setDomainName', '.mydomain.com']);
_gaq.push(['first._trackPageview']);