Some parts taken from: https://gist.github.com/kujohn/7209628
ipfw is officially deprecated and removed in OS X Yosemite. Pow requires another program pf to handle the port forwarding.
Create file /etc/pf.anchors/pow
Some parts taken from: https://gist.github.com/kujohn/7209628
ipfw is officially deprecated and removed in OS X Yosemite. Pow requires another program pf to handle the port forwarding.
Create file /etc/pf.anchors/pow
| services: | |
| log.handler.db: | |
| class: "Vendor\\Log\\Handler\\Db" | |
| arguments: | |
| manager: @em | |
| logger.db: | |
| class: "Monolog\\Logger" | |
| arguments: | |
| name: "db" | |
| calls: |
| <?php | |
| namespace ExampleBundle\Form; | |
| use Symfony\Component\Form\AbstractType; | |
| use Symfony\Component\Form\FormBuilder; | |
| use Symfony\Component\DependencyInjection\ContainerInterface; | |
| use Edge5\TestProjectBundle\Form\addTranslatedFieldSubscriber; |
| # http://henrik.nyh.se/2008/12/git-dirty-prompt | |
| # http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
| # username@Machine ~/dev/dir[master]$ # clean working directory | |
| # username@Machine ~/dev/dir[master*]$ # dirty working directory | |
| function parse_git_unpushed { | |
| local unpushed=`/usr/bin/git cherry -v origin/$(get_git_branch) 2> /dev/null` | |
| [[ "$unpushed" != "" ]] && echo "$(tput setaf 1) ++> $(tput sgr0)" | |
| } |
# This example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query string| //app.js Socket IO Test | |
| var app = require('express').createServer(), | |
| redis = require('socket.io/node_modules/redis'), | |
| io = require('socket.io').listen(app); | |
| var pub = redis.createClient(port, "url"); | |
| var sub = redis.createClient(port, "url"); | |
| var store = redis.createClient(port, "url"); | |
| pub.auth('pass', function(){console.log("adentro! pub")}); | |
| sub.auth('pass', function(){console.log("adentro! sub")}); |
| <?php | |
| protected function _editAction(Post $post) | |
| { | |
| $em = $this->get('doctrine.orm.default_entity_manager'); | |
| $factory = $this->get('form.factory'); | |
| $form = $factory->create(new PostFormType()); | |
| $form->setData($post); | |
| if ($this->get('request')->getMethod() === 'POST') { |
| <?php | |
| $this->widgetSchema['image'] = new sfWidgetFormInputFileEditable(array( | |
| 'label' => 'Image', | |
| 'file_src' => sprintf('/uploads/%s/%s', sfConfig::get('app_upload_image_path', 'images') ,$this->getObject()->getImage()), | |
| 'is_image' => true, | |
| 'edit_mode' => !$this->isNew(), | |
| 'template' => '<div>%file%<br />%input%<br />%delete% %delete_label%</div>', | |
| )); | |
| $this->validatorSchema['image_delete'] = new sfValidatorBoolean(); |