terça-feira, 7 de junho de 2016

Install Aptana Studio 3 on Windows without download NodeJS by installer.

Excute the Aptana install executable specifying the extraction directory, like this:

Aptana_Studio_3_Setup_3.6.1.exe /extract:[folderToExtract]

Remembering that Aptana Studio needs a x86 version of JRE to execute.

ConEmu tweaks

ConEmu tweaks

Make CMD output in utf-8 charset

In [Startup > Enviroment > Set up enviroment variables, cmd.exe aliases, codepage] add the following line:

chcp utf8

quarta-feira, 18 de maio de 2016

Composer cheat sheet

  • composer require [vendor/package]: add [vendor/package] entry to "require" attribute of composer.json
  • composer install: reads the composer.json and install all packages
  • composer dump-autoload: reads composer.json and generates "vendor/autoload.php" based on composer.json autoload entry.
  • composer show [vendor/package] [--all]: Lists all available packages.If [vendor/package] name is supplied, it will list info about [vendor/package] package. If --all parameter is supplied, it will list info about this package taking it from remote global repository
  • composer create-project [vendor/package] [projectFolderPath] [desiredPackageBranch]: create a folder [projectFolderPath] and clone the remote [vendor/package] [desiredPackageBranch] branch into this folder.

segunda-feira, 2 de maio de 2016

My VLC's prefered config

  • Repeat All Playlist: Playlist > Repeat All = true;
  • Diable popup on track change: Interface > Main interfaces > Qt > Show notification popup on track change = Never;
  • Audio normalization:
    • In Advanced mode: Tool > Preferences > Audio > Filters > Volume Normalizer=true; Tool > Preferences > Audio > Filters > Volume Normalizer > numbers of Audio Buffers = 200
    • In Advanced mode: Tool > Preferences > Audio > Filters > Volume Normalizer=true; Tool > Preferences > Audio > Filters > Volume Normalizer > Maximal Volume Level = 3
    • In Advanced mode: Tool > Preferences > Hotkeys > Play/pause:
    • In Advanced mode: Tool > Preferences > Hotkeys > Next:
    • In Advanced mode: Tool > Preferences > Hotkeys > Previous:

segunda-feira, 18 de abril de 2016

Reset MySQL root password

Reseting MySQL root password

Step One: Stop mysql service:

$sudo /etc/init.d/mysql stop
Stopping MySQL database server: mysqld.

Step Two: Start to MySQL server w/o password:

$sudo mysqld_safe --skip-grant-tables &
[1] 5988
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[6025]: started

Step Three: Connect to mysql server using mysql client:

$mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.15-Debian_1-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>

Step Four: Setup new MySQL root user password:

mysql> use mysql;
mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;
mysql> quit

Obs: if your MySQL version is 5.6 or higher, use the column authentication_string instead password.

Step Five: Stop MySQL Server:

$sudo /etc/init.d/mysql stop
Stopping MySQL database server: mysqld
STOPPING server from pid file /var/run/mysqld/mysqld.pid
mysqld_safe[6186]: ended
[1]+  Done                    mysqld_safe --skip-grant-tables

Step Six: Start MySQL server and test it:

$sudo /etc/init.d/mysql start
$mysql -u root -p

Sources:

  • http://www.cyberciti.biz/tips/recover-mysql-root-password.html

quarta-feira, 13 de abril de 2016

Great Cygwin Packages

shortly

bash-completion,wget,curl,git,gitk,git-completion,gitweb,nc,nc6,vim,tmux,python-setuptools,zip,unzip,xxd,patch,tree;

domingo, 3 de janeiro de 2016

ConEmu with CygWin and TMUX - open terminal failed: not a terminal

This days, I was surprised by ConEmu. I had used TMUX for a long time on Ubuntu, but this days, when I needed use it on Cygwin, It caught me off guard. When typed tmux, I got the following error:

$ tmux
open terminal failed: not a terminal

This occur because ConEmu, at its installation setup, create a menu entry to start Cygwin with this task launching command:

set CHERE_INVOKING=1 & %ConEmuDrive%\cygwin\bin\sh.exe --login -i -new_console:C:"%ConEmuDrive%\cygwin\Cygwin.ico"

This command executes sh.exe instead of mintty.exe, the default Cygwin terminal.

To solve this problem, just change the task launching command to:

C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico - -new_console:C:"%ConEmuDrive%\cygwin\Cygwin.ico"

Your Cygwin installation path may be different from mine, that is 'C:\cygwin\bin\mintty.exe'. So, You must change it if your path differs.