$ git config --global color.ui true
How to send POST with curl?
$ curl -d "param1=value1¶m2=value2" http://example.com/resource.cgi
$ curl -F "fileupload=@filename.txt" http://example.com/resource.cgi
For a RESTful HTTP POST containing XML or JSON, use this:
$ curl -X POST -d @filename http://example.com/path/to/resource
First things you need to do after Ubuntu installation
First things you need to do after Ubuntu installation:
- sudo apt-get install compizconfig-settings-manager (turn on panel autohide and change icons size)
- sudo apt-get install vim
- sudo apt-get install pysdm (partitions automount; Storage Device Manager)
Write your own and extend this list ;)
MemoryError and numpy / matplotlib
If you see MemoryError in your application running within Apache (in my case with wsgi [mod_wsgi]) it is probably because of SELinux.
You have to allow httpd to execute code from the /tmp directory
root # setsebool httpd_tmp_exec on
Problem with eAccelerator and Doctrine 2
When you see message “Class X is not a valid entity or mapped super class” you can solve this problem with adding two lines to the .htaccess file:
php_flag eaccelerator.enable 0 php_flag eaccelerator.optimizer 0There is also article which describes problem mentioned above.
How to set/change host in Symfony 2 command?
$host = $this->getContainer()->getParameter('host');
$this->getContainer()->get('router')->getContext()->setHost($host);
$this->getContainer()->get('router')->getContext()->setScheme('https');
$this->getContainer()->get('router')->getContext()->setBaseUrl('/web');