Skip to content

Instantly share code, notes, and snippets.

@fnayou
fnayou / Install_Phpstorm.sh
Created October 1, 2017 23:27 — forked from theodorosploumis/Install_Phpstorm.sh
Update phpstorm on Ubuntu linux.
#!/bin/bash -e
# IMPORTANT. My phpstom installation exists on /opt/phpstorm.
# IMPORTANT. Run with sudo!
# Early Access program: https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Early+Access+Program
echo -n "Please enter the PhpStorm download url (eg http://download.jetbrains.com/webide/PhpStorm-EAP-141.690.tar.gz): "
read url
# Download file from url
echo "Downloading PhpStorm to ~/Desktop"
@fnayou
fnayou / cv-Dockerfile
Created June 7, 2017 07:15
docker nginx proxy
FROM nginx:alpine
COPY . /usr/share/nginx/html
WORKDIR /usr/share/nginx/html
@fnayou
fnayou / CamelCaseAttributes.php
Created March 28, 2017 10:51 — forked from liaosankai/CamelCaseAttributes.php
Laravel5 Model CamelCase Attributes Handle
<?php
/**
* CamelCaseAttributes Trait
*
* @see http://laravelsnippets.com/snippets/camel-case-attributes
* @see http://php.net/manual/en/function.array-change-key-case.php
*/
trait CamelCaseAttributes
{
@fnayou
fnayou / reference.yml
Created March 17, 2017 15:30 — forked from mnapoli/reference.yml
Doctrine YAML configuration reference
# Inspired from http://blog.hio.fr/2011/09/17/doctrine2-yaml-mapping-example.html
MyEntity:
type: entity
repositoryClass: MyRepositoryClass
table: my_entity
namedQueries:
all: "SELECT u FROM __CLASS__ u"
# Class-Table-Inheritance
<?php
namespace remiii\UtilsBundle\Command\Assets ;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand ;
use Symfony\Component\Console\Input\InputArgument ;
use Symfony\Component\Console\Input\InputInterface ;
use Symfony\Component\Console\Input\InputOption ;
use Symfony\Component\Console\Output\OutputInterface ;