Skip to content

Instantly share code, notes, and snippets.

View rogeriopradoj's full-sized avatar
😀

Rogerio Prado de Jesus rogeriopradoj

😀
View GitHub Profile
<?php
include __DIR__ . '/bootstrap.php';
use DoctrineNaPratica\Model\User;
use DoctrineNaPratica\Model\Course;
use DoctrineNaPratica\Model\Lesson;
use DoctrineNaPratica\Model\Subscription;
// $user = new User;
mkdir scrutinizer && cd scrutinizer
# Install tools
# - Scrutinizer and composer
wget http://scrutinizer-ci.com/scrutinizer.phar
curl -sS https://getcomposer.org/installer | php
# - All needed CI tools
php composer.phar require h4cc/phpqatools:~1.2
cp -p composer.phar vendor/bin/composer
@philsturgeon
philsturgeon / 0-intro.md
Last active June 7, 2018 09:34
PSR-2 v CodeSniffer PSR-2

This is a list of issues or discrepencies between the wording or intention of PSR-2 itself and the CodeSniffer PSR-2 ruleset.

Add suggestions in the comments or tweet me (@philsturgeon) if you have more inconsistencies to report.

# -*- mode: ruby -*-
# vi: set ft=ruby :
class Vagrant::Config::V2::Root
def has_key?(name)
@config_map.has_key?(name.to_sym)
end
end
Vagrant.configure("2") do |config|
@alganet
alganet / self_stats.php
Last active December 17, 2015 11:19
PHP Self Stats
<?php
// PHP Self Stats
/*
* get_loaded_extensions() returns all the extension names
* currently loaded.
*
* Using array_intersect(), we can get only the extensions
* we want from those which are really available.
NameVirtualHost 127.0.0.2:80
<Directory "/var/www/html/example/">
Options -Indexes +FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost 127.0.0.2:80>
@danguita
danguita / microsoft-ie-ova-images
Created February 24, 2013 17:11
Microsoft IE OVA images for VirtualBox (OSX)
# Microsoft IE OVA images from http://www.modern.ie/en-us/virtualization-tools
# VirtualBox for Mac:
http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/OSX/IE6_WinXP.ova.zip
http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/OSX/IE7_Vista.ova.zip
http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/OSX/IE8_Win7.zip
http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/OSX/IE9_Win7.zip
http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/OSX/IE10_Win8.ova.zip
@henriquemoody
henriquemoody / phpunit.bash
Last active May 10, 2023 02:52
PHPUnit Bash Completion. sudo curl -L https://gist.githubusercontent.com/henriquemoody/5014805/raw/phpunit.bash -o /etc/bash_completion.d/phpunit && source /etc/bash_completion.d/phpunit
# Bash-Completion script for PHPUnit
#
# Created by Henrique Moody <henriquemoody@gmail.com>
#
_phpunit()
{
COMPREPLY=()
local cur="${COMP_WORDS[COMP_CWORD]}"
local prev="${COMP_WORDS[COMP_CWORD-1]}"
@alganet
alganet / hercules.sql
Created February 11, 2013 18:47
This herculous, monstruous SQL script imported, in a single shot, incrementally if stoped, a legacy database into a clean new one normalized. Some names were changed.
/*********************************************
*
* Importação de dados Acme-Acme
*
* Autores: Alexandre Gomes Gaigalas
* Atilio Serafim
* Criação: 01/12/2008
* Alteração: 04/12/2008
*
*********************************************/
@willmendesneto
willmendesneto / Twig.php
Last active September 30, 2019 12:40
Inserindo Twig Template Engine no Codeigniter via Composer Localilzação dos arquivos: Twig.php => application/libraries/Twig.php Welcome.php => application/controller/Welcome.php autoload.php => application/config/autoload.php template.html.twig => application/views/template.html.twig index.html.twig => application/views/index.html.twig
<?php if (!defined('BASEPATH')) {exit('No direct script access allowed');}
/**
*
* Arquivo inserido em application/libraries/Twig.php
*
*/
class Twig {
/**
* Referência da instância da classe CodeIgniter