This file contains hidden or 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
    
  
  
    
  | <ul> | |
| {% for project in pagination %} | |
| <li>{{ project.name }} has {{ project.?? }} tasks</li> | |
| {% endfor %} | |
| </ul> | 
  
    
      This file contains hidden or 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
    
  
  
    
  | $('#mySearch').keyup(function() { | |
| clearTimeout($.data(this, 'timer')); | |
| var wait = setTimeout(search, 500); | |
| $(this).data('timer', wait); | |
| }); | |
| function search() { | |
| $.post("stuff.php", {nStr: "" + $('#mySearch').val() + ""}, function(data){ | |
| if(data.length > 0) { | |
| $('#suggestions').show(); | 
  
    
      This file contains hidden or 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 | |
| /** | |
| * Abstract class which has helper functions to get data from the database | |
| */ | |
| abstract class Base_Custom_Data | |
| { | |
| /** | |
| * The current table name | |
| * | |
| * @var boolean | 
ubuntu 12.04 14.04
Reference http://stackoverflow.com/a/18490935/2037928
Login as root
Install needed packages
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
  
    
      This file contains hidden or 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
    
  
  
    
  | git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote | 
  
    
      This file contains hidden or 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
    
  
  
    
  | is_processing = false; | |
| last_page = false; | |
| function addMoreElements() { | |
| is_processing = true; | |
| $.ajax({ | |
| type: "GET", | |
| //FOS Routing | |
| url: Routing.generate('route_name', {page: page}), | |
| success: function(data) { | |
| if (data.html.length > 0) { | 
As William Durand was recently explaining in his SOS, he "didn't see any other interesting blog post about REST with Symfony recently unfortunately". After spending some long hours to implement an API strongly secured with oAuth, I thought it was time for me to purpose my simple explanation of how to do it.
You might have already seen some good explanation of how to easily create a REST API with Symfony2. There are famous really good bundles a.k.a. :
  
    
      This file contains hidden or 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
    
  
  
    
  | parameters | |
| --level=psr2 --verbose fix $FileDir$/$FileName$ | |
| working directory | |
| $ProjectFileDir$ | 
  
    
      This file contains hidden or 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/sh | |
| # | |
| # Git hook that prevents commits to master | |
| # use --no-verify to bypass this hook | |
| # ex: git commit -m "init commit" --no-verify | |
| branch=`git symbolic-ref HEAD` | |
| if [ "$branch" = "refs/heads/master" ]; then | |
| echo "Direct commits to the branch master are not allowed" | |
| exit 1 | 
OlderNewer