{
"jsonrpc": "2.0",
"method": "wishlist.add",
"params": {
"product_id": 1
},
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 App\ApiBundle\Controller; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; | |
use FOS\RestBundle\Controller\Annotations\View; | |
use Nelmio\ApiDocBundle\Annotation\ApiDoc; | |
use Symfony\Component\HttpFoundation\Request; |
A list of amazingly awesome PHP libraries that you should consider using (and some other shiny extras).
- Composer/Packagist - A package and dependency manager.
- Composer Installers - A multi framework Composer library installer.
- Symfony2 - A framework comprised of individual components.
- Zend Framework 2 - Another framework comprised of individual components.
- Laravel 4 - A simple PHP framework.
- Lithium - Another framework of components.
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
<IfModule mod_rewrite.c> | |
ErrorDocument 503 /system/maintenance.html | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !.(css|gif|jpg|png)$ | |
RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f | |
RewriteCond %{SCRIPT_FILENAME} !maintenance.html | |
RewriteRule ^.*$ - [redirect=503,last] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)$ app.php [QSA,L] |
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
Dear soon-to-be-former user, | |
We've got some fantastic news! Well, it's great news for us anyway. You, on | |
the other hand, are fucked. | |
We've just been acquired by: | |
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
# find folder or file recursively and delete it | |
$ find . -name ".git" -exec rm -rf '{}' \; | |
# compress and archive | |
$ tar -zcvf archive-name.tar.gz directory-name | |
# uncompress and unarchive | |
$ tar -zxvf archive-name.tar.gz | |
# show changed files through svn revisions |
source: http://www.skorks.com/2009/09/bash-shortcuts-for-maximum-productivity/
- Ctrl + a – go to the start of the command line
- Ctrl + e – go to the end of the command line
- Ctrl + k – delete from cursor to the end of the command line
- Ctrl + u – delete from cursor to the start of the command line
- Ctrl + w – delete from cursor to start of word (i.e. delete backwards one word)
- Ctrl + y – paste word or text that was cut using one of the deletion shortcuts (such as the one above) after the cursor
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
git archive --format=tar origin/master | gzip -9c | ssh user@yourserver.com "cd /var/www; tar xvzf -" |
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
set :application, "application_name" | |
default_run_options[:pty] = true | |
set :scm, :git | |
set :repository, "git@github.com:memphys/application_name.git" | |
# setting ssh port and option to use ssh-keys stored on local machine | |
set :ssh_options, {:forward_agent => true, :port => 8822} |
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
# Creating dir for translation files | |
mkdir -p /path/to/myapp/conf/locale | |
cd /path/to/myapp | |
# Creating language file by scanning app directory for text marked for translation. | |
# It will appear in /path/to/conf/locale/en/LC_MESSAGES/django.po | |
# Run command for each needed language | |
PYTHONPATH=/path/to/googleappengine/lib/django/ | |
/path/to/googleappengine/lib/django/django/bin/make-messages.py -l en |
NewerOlder