Skip to content

Instantly share code, notes, and snippets.

View danilobatistaqueiroz's full-sized avatar

Danilo Batista de Queiroz danilobatistaqueiroz

View GitHub Profile
@danilobatistaqueiroz
danilobatistaqueiroz / php_code_lint.md
Last active November 12, 2017 02:26
Tutorial Php Lint Coding Standards Fixer

Tutorial Php Lint Coding Standards Fixer

PHPMD

install phpmd:

composer require phpmd/phpmd

run phpmd:

configuring php extension for mongodb

download the PECL extension:

https://pecl.php.net/package/mongodb

download and unpack the file: mongodb.dll or mongodb.so in the directory ext

open php.ini and configure the extension:

extension=php_mongodb.dll

@danilobatistaqueiroz
danilobatistaqueiroz / postgresql_tips.md
Last active November 24, 2017 00:29
Postgresql Tips

Postgres Tips

jdbc_url: jdbc:postgresql://localhost:5432/databasename

showing all databases:

SELECT datname FROM pg_database WHERE datistemplate = false;

This lists tables in the current database

@danilobatistaqueiroz
danilobatistaqueiroz / mysql_tips.md
Last active November 24, 2017 00:29
Mysql Tips

Mysql Tips

open MySql Shell

mysqlshell

digit:

\sql
\c root@localhost

Configuring Redis Session Driver In CodeIgniter

Configure config.php file:

$config['sess_driver'] = 'redis';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_save_path'] = 'tcp://localhost:6379';

server

@danilobatistaqueiroz
danilobatistaqueiroz / connection_on_ubuntu_using_windows.md
Last active November 12, 2017 02:27
Connection on Ubuntu using Windows 7

Remote Accessing an Ubuntu using Windows 7

Add an iptables rule: iptables -A INPUT -p tcp -m multiport --destination-ports 3350 -i lo -j ACCEPT

Install ssh server: sudo apt-get install openssh-server

Inside dconf-tools - remote-access - Uncheck the option: require-encryption

An excelent client for Windows: MobaXterm

@danilobatistaqueiroz
danilobatistaqueiroz / working_with_protractor.md
Last active November 29, 2017 14:22
working with protractor

Working With Protractor

installing protractor globally

npm install -g protractor

protractor --version

npm install webdriver-manager -g

@danilobatistaqueiroz
danilobatistaqueiroz / ubuntu_qemu.md
Last active November 24, 2017 00:28
Virtualizing Ubuntu with QEMU for Windows

Virtualizing Ubuntu with QEMU for Windows

download the latest version:
https://qemu.weilnetz.de/w64/

unpack

create a virtual disk:
qemu-img create ubuntu.img 20G

@danilobatistaqueiroz
danilobatistaqueiroz / slim_framework.md
Last active November 24, 2017 01:22
Starting with slim micro framework

Starting with slim micro framework

A very simple example of a Slim application

there are many ways to start a new project using composer.

one simple way to begin with Slim using Composer is typing in a new folder:

composer require slim/slim

@danilobatistaqueiroz
danilobatistaqueiroz / xrdp_fedora_windows_remote.md
Last active November 27, 2017 01:05
accessing a fedora workstation from windows 7 with remote desktop

Accessing a Fedora Workstation using Xrdp from Windows 7 with Remote Desktop

I'm using a crossover cable between two computers.

You need to configure the ethernet for both computers.

remote_desktop0

remote_desktop1