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 / 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 / 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 / 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

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 / mysql_tips.md
Last active November 24, 2017 00:29
Mysql Tips

Mysql Tips

open MySql Shell

mysqlshell

digit:

\sql
\c root@localhost

@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

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 / 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:

@danilobatistaqueiroz
danilobatistaqueiroz / mongodb_tips.md
Last active November 5, 2017 03:34
MongoDB Tips

MongoDB Tips

Some characteristics

Auto-sharding

Index on any attribute

Conversion/mapping of application objects to database objects not needed.