- Alignment (CMD + CTRL + A)
- DocBlockR (Start commenting + push tab or enter)
- GitGutter (Highlight lines changed, compare files, etc.)
- Package control (Mandatory on Sublime)
- Php-Twig
- PhpNamespace (ALT + I, ALT + U)
- TrailingSpaces (Can be triggered on save, check user config)
- Unicode Character Highlither (Highlight non breaking spaces for example)
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
#!/usr/bin/env php | |
<?php | |
$paths = array(); | |
if (isset($_SERVER['argv'])) | |
{ | |
$paths = $_SERVER['argv']; | |
array_shift($paths); | |
if (!$paths) |
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 | |
/** | |
* Convert a multi-dimensions array to a 1 flat array. | |
* | |
* @param array $array | |
* @param string $separator | |
* @param string $prefix | |
* @return array | |
*/ |
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
server { | |
listen 80; | |
server_name server.mydomain.net | |
root /var/www/app/web; | |
index index.php; | |
location ~ \.php$ { | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
include fastcgi_params; |
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
# GITOLITE 3 | |
sudo -u git -H sed -i "s/\(GIT_CONFIG_KEYS\s*=>*\s*\).\{2\}/\1'\.\*'/g" /home/git/.gitolite.rc | |
# GITOLITE 2 | |
sudo -u git -H sed -i 's/\(GL_GITCONFIG_KEYS\s*=>*\s*\).\{2\}/\1"\.\*"/g' /home/git/.gitolite.rc |
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 | |
// src/Igorw/FooController.php | |
namespace Igorw; | |
class FooController | |
{ | |
function getIndexAction() | |
{ |
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
import React from 'react'; | |
class EmbedIframe extends React.Component { | |
resizeIframe = () => { | |
const height = Math.max(this.props.minHeight, this.iframe.contentWindow.document.body.offsetHeight); | |
this.iframe.height = `${height}px`; | |
} | |
componentDidMount = () => { |
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 | |
class ResourceAutocompleteType extends AbstractType | |
{ | |
// ... | |
private $resourceName; | |
public function __construct($resourceName) | |
{ |
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 | |
# First we need to find the big files | |
# source: https://stackoverflow.com/questions/10622179/how-to-find-identify-large-files-commits-in-git-history/20460121#20460121 | |
REPO_URL="git@domain.tld:your-repo-here.git" | |
WORKING_DIR=$(mktemp -d); | |
cd "${WORKING_DIR}" | |
git clone --mirror "${REPO_URL}" source.git; |
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
class MoneyType extends AbstractType implements DataMapperInterface | |
{ | |
public function buildForm(FormBuilder $builder, array $options) | |
{ | |
$builder | |
->add('amount', 'integer') | |
->add('currency', 'string') | |
->setDataMapper($this) | |
; | |
} |
OlderNewer