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
sudo tcpdump -i eth1 icmp and icmp[icmptype]=icmp-echo |
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
zend_extension=/usr/lib/php5/20131226/xdebug.so | |
xdebug.auto_trace=1 | |
xdebug.cli_color=1 | |
xdebug.collect_assignments=1 | |
xdebug.collect_includes=1 | |
xdebug.collect_params=1 | |
xdebug.collect_return=1 | |
xdebug.collect_vars=1 | |
xdebug.coverage_enable=1 | |
xdebug.default_enable=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
# ~/.gitconfig | |
# Add this to your global git configuration file | |
# Change phpstorm to webstorm, if you use that. | |
# Diff and merge tool changes | |
# Run `git difftool <directory/file>...` or `git mergetool <directory/file>...` | |
[merge] | |
tool = phpstorm | |
[diff] | |
tool = phpstorm |
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
$ sudo apt-get update | |
$ sudo apt-get install libmcrypt-dev | |
$ curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew | |
$ chmod +x phpbrew | |
$ sudo mv phpbrew /usr/local/bin/ | |
$ phpbrew init | |
# add this to your ~/.bashrc: | |
$ [[ -e ~/.phpbrew/bashrc ]] && source ~/.phpbrew/bashrc |
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/sh | |
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` | |
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php` | |
# Determine if a file list is passed | |
if [ "$#" -eq 1 ] | |
then | |
oIFS=$IFS | |
IFS=' |
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
# Railscast | |
http://railscasts.com/episodes/308-oh-my-zsh | |
# Install Zsh | |
sudo apt-get update && sudo apt-get install zsh | |
# Install Oh-my-zsh | |
wget –no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O – | sh | |
# Make ZSH default shell |
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
FROM php:5.6.31-fpm | |
LABEL maintainer="avandrevitor@gmail.com" | |
RUN apt-get update -y | |
# Install Depedencies | |
RUN apt-get install -y \ | |
sudo \ | |
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
<?php | |
protected function sanitizer($data) | |
{ | |
if (is_array($data)) { | |
foreach ($data as &$value) { | |
$value = $this->sanitizer($value); | |
} | |
} else { | |
$data = mb_convert_encoding($data, "UTF-8", "ISO-8859-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
version: "2.0" | |
services: | |
mysql: | |
container_name: my-mysql | |
image: mysql/mysql-server:latest | |
hostname: my-mysql | |
working_dir: /data | |
volumes: | |
- ./data:/data/ | |
environment: |
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 | |
/** | |
* Firebird | |
*/ | |
$dsn = "firebird:dbname=192.168.100.123/3050://firebird/data/database.gdb"; | |
$dsn = "firebird:host=192.168.100.123/3050;dbname=/firebird/data/database.gdb;charset=UTF8"; | |
$pdo = new PDO($dsn,'SYSDBA','masterkey'); | |
/** |