Skip to content

Instantly share code, notes, and snippets.

View rogeriopradoj's full-sized avatar
😀

Rogerio Prado de Jesus rogeriopradoj

😀
View GitHub Profile
@rogeriopradoj
rogeriopradoj / gist:3768755
Created September 23, 2012 03:37
Vagrant: O que, Por que e Como - Passo 4 - 1
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
# Assign this VM to a host-only network IP, allowing you to access it
# via the IP. Host-only networks can talk to the host machine as well as
# any other machines on the same network, but cannot be accessed (through this
# network interface) by any external networks.
config.vm.network :hostonly, "192.168.33.10"
@rogeriopradoj
rogeriopradoj / gist:3768771
Created September 23, 2012 03:45
Vagrant: O que, Por que e Como - Passo 4 - 2
vagrant reload
@rogeriopradoj
rogeriopradoj / gist:3773570
Created September 24, 2012 00:29
Vagrant: O que, Por que e Como - Passo 5 - 1
file {'testfile':
path => '/tmp/testfile',
ensure => present,
mode => 0640,
content => "I'm a test file.",
}
@rogeriopradoj
rogeriopradoj / gist:3773593
Created September 24, 2012 00:38
Vagrant: O que, Por que e Como - Passo 5 - 2
include apache
$docroot = '/vagrant/www/pyrocms/'
$db_location = "/vagrant/db/pyrocms.sqlite"
# Apache setup
class {'apache::php': }
apache::vhost { 'local.pyrocms':
priority => '20',
port => '80',
docroot => $docroot,
configure_firewall => false,
@rogeriopradoj
rogeriopradoj / gist:3773600
Created September 24, 2012 00:40
Vagrant: O que, Por que e Como - Passo 5 - 3
include php
php::module { ['xdebug', 'pgsql', 'curl', 'gd'] :
notify => [ Service['httpd'], ],
}
php::conf { [ 'pdo', 'pdo_pgsql']:
require => Package['php5-pgsql'],
notify => Service['httpd'],
}
@rogeriopradoj
rogeriopradoj / gist:3773610
Created September 24, 2012 00:45
Vagrant: O que, Por que e Como - Passo 5 - 4
include postgresql
class {'postgresql::server': }
postgresql::db { 'pyrocms':
owner => 'pyrocms',
password => 'password',
}
@rogeriopradoj
rogeriopradoj / gist:3773619
Created September 24, 2012 00:49
Vagrant: O que, Por que e Como - Passo 5 - 5
file { $docroot:
ensure => 'directory',
}
file { "${docroot}system/cms/config/config.php":
ensure => "present",
mode => "0666",
require => File[$docroot],
}
$writeable_dirs = ["${docroot}system/cms/cache/", "${docroot}system/cms/config/", "${docroot}addons/", "${docroot}assets/cache/", "${docroot}uploads/"]
file { $writeable_dirs:
@rogeriopradoj
rogeriopradoj / gist:3773657
Created September 24, 2012 00:59
Vagrant: O que, Por que e Como - Passo 5 - 6
git clone --recursive git://github.com/pyrocms/devops-vagrant.git ~/vagrant/pyrocms
cd ~/vagrant/pyrocms
vagrant up
@rogeriopradoj
rogeriopradoj / commitcomment-2316728
Created December 19, 2012 03:33
Comentários no commit https://github.com/rogeriopradoj/codeigniter-validation/commit/1e3300ebcfe6c233668a3b234d2554fe92854541. Devido a exclusão do repositório acima (migração para https://github.com/FriendsOfCI/codeigniter-validation), decidi guardar os comentários em um gist para que eles não sejam perdidos. Se pudermos, para contiuar está dis…
https://github.com/rogeriopradoj/codeigniter-validation/commit/1e3300ebcfe6c233668a3b234d2554fe92854541#commitcomment-2316728
@sputinyk:
Interessante, mas seria mais fácil fazer:
$_POST = $data;
E utilizar a classe nativa de validação do CI. Faz sentido o que disse?
@rogeriopradoj
rogeriopradoj / Vagrantfile
Last active December 15, 2015 08:39
Vagrantfile, versão 32-bit para o projeto https://github.com/ThamaraHessel/DojoOnline/tree/vagrant, serve para quem tiver problemas em subir a máquina virtual com a `precise64`, e não conseguir habilitar na BIOS o VT-X, conforme discussão nessa lista: https://groups.google.com/forum/?fromgroups=#!topic/vagrant-up/4rOCCWfILYc
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# define box base
config.vm.box = "precise32"
# url para download automático da box se primeira utilização
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
# define modo interface de rede e ip fixo