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
#!/bin/bash | |
apt-get install php5-dev rake | |
cd /tmp | |
git clone https://github.com/chobie/php-sundown.git php-sundown -b development | |
cd php-sundown | |
# this command will fetch submodule and copy neccesally files to src dir. and compile it. |
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
mkdir -p /usr/local/src | |
== XCode Command line tools | |
Installer XCode ou récuppérer depuis l'Apple Developper Center l'install unique des CommandLine Tools | |
== X11 | |
http://xquartz.macosforge.org/ | |
== HomeBrew | |
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)" |
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
# Install ffmepg (for the screencast) & imagemagick (to optimize the GIF file for web usage) | |
brew install ffmpeg | |
brew install imagemagick | |
# Make the screencast and compress it | |
ffmpeg -i ScreenFlow.mov -pix_fmt rgb24 output.gif | |
convert -layers Optimize output.gif output_optimized.gif | |
# Upload it somewere in the cloud... | |
# ... and use the file in the desire website. Here's the markdown syntax: |
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
To increase temporary (during the current session): | |
sudo sysctl -w kern.sysv.shmmax=12582912 | |
sudo sysctl -w kern.sysv.shmall=12582912 | |
To enable it forever: | |
sudo vim /etc/sysctl.conf | |
kern.sysv.shmall=12582912 | |
kern.sysv.shmmax=12582912 |
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
oldPath="vendor/example" | |
git config -f .git/config --remove-section "submodule.${oldPath}" | |
git config -f .gitmodules --remove-section "submodule.${oldPath}" | |
git rm --cached "${oldPath}" | |
rm -rf "${oldPath}" ## remove src (optional) | |
rm -rf ".git/modules/${oldPath}" ## cleanup gitdir (optional housekeeping) | |
git add .gitmodules | |
git commit -m "Removed ${oldPath}" |
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
" Paste this in your .vimrc file | |
" Use w!! when you've forgotten to open your file as root | |
cmap w!! w !sudo tee % >/dev/null |
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
export PHP_IDE_CONFIG=serverName=mywebsite.lan | |
php -dxdebug.remote_host=192.168.33.1 app/console ... |
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
# Enable OPCache | |
zend_extension=/path/to/lib/php/extensions/no-debug-non-zts-20121212/opcache.so | |
# OPCache settings | |
opcache.memory_consumption=128 | |
opcache.interned_strings_buffer=8 | |
opcache.max_accelerated_files=4000 | |
opcache.revalidate_freq=60 | |
opcache.fast_shutdown=1 | |
opcache.enable_cli=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 Your\Bundle\Listener; | |
use Symfony\Component\HttpKernel\Event\GetResponseEvent; | |
use Symfony\Component\HttpKernel\KernelEvents; | |
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
class LocaleListener implements EventSubscriberInterface | |
{ |
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 Foo\BarBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
class ArticleController extends Controller | |
{ | |
public function editAction(Article article) | |
{ |
OlderNewer