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 / Cartesian.php
Created May 20, 2016 21:17 — forked from jwage/Cartesian.php
PHP Cartesian Function
<?php
$attributeValues = array(
'color' => array('Red', 'White', 'Blue'),
'size' => array(1, 2, 3, 4),
'fabric' => array('Cloth', 'Silk')
);
class Cartesian
{
@rogeriopradoj
rogeriopradoj / README.md
Created June 12, 2016 17:21 — forked from chrisjacob/README.md
Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Intro

Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Author: Chris Jacob @_chrisjacob

Tutorial (Gist): https://gist.github.com/833223

The Result

@rogeriopradoj
rogeriopradoj / vagrant-box-update-all.sh
Created June 16, 2016 00:13 — forked from thom8/vagrant-box-update-all.sh
Update all your vagrant base boxes
#!/bin/bash
# Find all boxes which have updates
AVAILABLE_UPDATES=`vagrant box outdated --global | grep outdated | tr -d "*'" | cut -d ' ' -f 2`
if [ ! ${#AVAILABLE_UPDATES[@]} -eq 0 ]; then
for box in $AVAILABLE_UPDATES ; do
echo "Found an update for $box"
@rogeriopradoj
rogeriopradoj / howto.md
Created March 6, 2017 10:42 — forked from pitpit/howto.md
HTTPS avec le serveur de dev PHP (en utilisant stunnel)

Installer puis lancer un serveur de dev en HTTPS grâce à stunnel

brew install stunnel
cd /usr/local/etc/stunnel
openssl genrsa -out key.pem 2048
openssl req -new -x509 -key key.pem -out cert.pem -days 1095
cat key.pem cert.pem >> stunnel.pem

chmod 600 stunnel.pem
@rogeriopradoj
rogeriopradoj / phpstorm-vs-sublimetext-shortcuts.md
Created April 25, 2017 03:49 — forked from silasrm/phpstorm-vs-sublimetext-shortcuts.md
Teclas de atalhos do PHPStorm com funções semelhantes ao Sublime Text, e outras interessantes.

#Teclas de atalhos do PHPStorm com funções semelhantes ao Sublime Text, e outras interessantes.

Sublime Text PHPStorm Função
CMD+P CMD+Shift+O Busca por arquivos no projeto
CMD+R CMD+F12 (1) Lista os métodos da classe e outros símbolos
CMD+F CMD+F Busca no arquivo
CMD+Option+F CMD+R Busca e troca os valores no arquivo
CMD+Shift+F CMD+Shift+F Busca, busca e troca e outros em um determinado caminho com várias regras.
CMD+D (2) Option+Up (2) Seleciona palavra
@rogeriopradoj
rogeriopradoj / dockersp.md
Created April 30, 2017 11:53 — forked from fike/dockersp.md
Guia do palestrante do Docker SP

Olá!

Nós, Docker SP, estamos contentes em saber do seu interesse em dar uma palestra no Meetup Docker São Paulo.

Aqui está uma sugestão de como preparar uma apresentação na perspectiva da organização:

  • Quando for uma apresentação do tipo mão na massa, interessante demostrar como as funcionalidades do Docker e ecossistema funcionam. Uma boa regra da apresentação ter 50% de demostração e 50% de apresentação, discussão, etc.

  • A palestra estará compartilhando conhecimento para o grupo, nós gostaríamos de educar nossos membros para aprender mais sobre Docker a cada evento. Mais discussões e compartilhamento de conhecimento sobre ferramentas do ecossistema de containers, arquitetura moderna de aplicações, prática e cultura de engenharia também é bem-vinda.  

@rogeriopradoj
rogeriopradoj / cntlm_npm.md
Created August 22, 2017 20:11 — forked from triskell/cntlm_npm.md
[Windows 7] CNTLM and NPM behind NTLM proxy

CNTLM and NPM behind NTLM proxy on Widows 7

CNTLM

  • Install CNTLM in a folder where you have full rights to run it as administrator.

  • Open cntlm.ini and fill it :

Username    YOUR_USERNAME
Domain YOUR_DOMAIN
@rogeriopradoj
rogeriopradoj / auto-deploy.md
Created October 21, 2017 12:05 — forked from domenic/0-github-actions.md
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.

@rogeriopradoj
rogeriopradoj / CodeIgniter_PDOSQLiteMySQL.php
Created November 20, 2017 18:20 — forked from yuigoto/CodeIgniter_PDOSQLiteMySQL.php
How to setup PDO and SQLite for CodeIgniter (for SQLite and MySQL). This is the `database.php` file in `the application/config` folder
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$active_group = 'default';
$query_builder = TRUE;
// FOR SQLITE
$db['default'] = array(
'dsn' => 'sqlite:[path-to-database-file]',
'hostname' => 'localhost',