Wednesday, May 11, 2016

Install composer and Yii2 on windows

Download and install wamp and composer from here if you have not installed php and composer yet

https://sourceforge.net/projects/wampserver/
https://getcomposer.org/Composer-Setup.exe

Open powershell in admin and run the following command:

> [cd to your own directory where you like to do development]
> composer global require "fxp/composer-asset-plugin:~1.1.1"
> composer create-project --prefer-dist yiisoft/yii2-app-basic myappname

The "myappname" is the directory to which yii2 will be installed

Thursday, March 31, 2016

Simple command to start with GIT

This post keeps some quick references to simple command lines for starting using git with bitbucket.

```bash
`mkdir ~/git/myproject
`cd ~/git/myproject
`git init
`git remote add origin https://[myname]@bitbucket/[myname]/myproject.git
`touch helloworld.txt
`git add --all .
`git commit -m "first time commit"
`git push origin master

Other useful commands like:


  • View remote urls : git remote -v
  • Change remote url: git remote set-url add origin ...

`

Tuesday, January 12, 2016

Chocolatey

Chocolatey is a machine packaging manager for Windows, which makes it very easy to install tools such as cygwin and many others on Windows platform.

To install Chocolatey, open powershell in administrator mode and run the following command:

iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))

To use Chocolatey for installing tools such as vagrant and virtualbox, run the following command in powershell:

cinst vagrant virtual

To install Cygwin, run the following command in powershell:

cinst cyg-get


Link: https://chocolatey.org/

Saturday, December 19, 2015

Convert *.jpg to *.ps on Mac OS

Firstly, install homebrew, then run the following command:

# brew install imagemagick

After the imagemagick is installed, run the following command to convert jpg to ps:

# convert picture.jpg picture.ps

Saturday, October 31, 2015

MacOS: Change [HOME] and [END] key to move to the begining or end of a line in a text editor

While writing code on Windows, the [HOME] and [END] key allow me to move to the begining or end of a line, but this is not the default behavior on MacOS while i am doing development at the moment. Since i love this feature and would like to have something similar, after digging i found the following way that works for me.

Download, install and run the Karakiner (https://pqrs.org/osx/karabiner/), In its "Change Key" tab, search for "Use PC style home/end", Now check to enable this feature, and there you have the PC style home/end shorts which allows to move to the begining or end of a line when pressing the [HOME] or [END] key