Sunday, August 21, 2016

How to install rabbitMQ on windows

I tried to follow the rabbitMQ official guide to download and install (include Erlang) but it is still not working.

This blog finally saved my day.
http://arcware.net/installing-rabbitmq-on-windows/

Here is the summary to be done,

Firewall inbound rules setup,
Allow ports for 5672,15672
Allow program for

  • %ProgramFiles%\erl8.0\bin\erl.exe
  • %ProgramFiles%\erl8.0\erts-8.0\bin\erl.exe
  • %ProgramFiles%\erl8.0\erts-8.0\bin\epmd.exe

Set up correct home drive and reinstall the service (running cmd as administrator)
SET HOMEDRIVE=C:
rabbitmq-plugins enable rabbitmq_management
rabbitmq-service stop
rabbitmq-service install
rabbitmq-service start


Monday, May 23, 2016

Detailed guides to set up docker on windows behind a firewall

Recently just set up a docker to work under windows behind a corporate firewall

Prerequisite:
 - Enable VT-X in BIOS
 - Setup Server environment variable in the host PC
   HTTP_PROXY=http://<proxy>:<port>
   HTTPS_PROXY=http://<proxy>:<port>
   NO_PROXY=192.168.99.100

1. Download docker toolbox for windows and install it

2. Start Docker quick terminal
I removed the default image and recreate one.
docker-machine stop default
docker-machine rm default

3. Create a image named dev
docker-machine create --driver virtualbox dev

4. Set up the start environment variable
docker-machine env dev
eval $("C:\program files\docker toolbox\docker-machine.exe" env dev)
docker ps

5.Remote SSH to the image and set up proxy in it
docker-machine ssh dev
sudo -s
echo "export HTTP_PROXY=http://<proxy>:<port>" >> /var/lib/boot2docker/profile
echo "export HTTPS_PROXY=http://<proxy>:<port>" >> /var/lib/boot2docker/profile

cat /var/lib/boot2docker/profile
exit

6. Restart the image
docker-machine restart dev

7. Run hello-world to test
docker run hello-world

-----
There are also a few useful command to use
docker ps -a
docker run -p 3000:3000 -v $(pwd):/var/www -w /var/www node npm start

-----------
Updated, just found a blog talking about this as well.
http://www.netinstructions.com/how-to-install-docker-on-windows-behind-a-proxy/




Friday, April 1, 2016

Tangling with Git proxy settings in windows

To set up git proxy globally, you need to run this command

git config --global http.proxy "http://<your proxy>:<port>"

However, it returned me error,

error: could not lock config file H:\/.gitconfig: No such file or
directory error: could not lock config file
 
To fix it, need to set up the %HOME% environment variable to your user profile path

1. echo %userprofile%

2. create a new environment variable as HOME = the user profile directory

And then you can run the config http.proxy command.

Friday, February 12, 2016

Setting up Github with Visual Studio Code

Visual studio code support work with GitHub, you can reference the below link for the detailed steps,
http://michaelcrump.net/using-github-with-visualstudio-code/

The main command is the below to run in a command shell,
git remote add origin https://github.com/xinzhang/SampleProject.git
git push -u origin master
Then the config file in the .git folder will become as below,
[remote "origin"]
url = https://github.com/mbcrump/SampleProject.git
fetch = +refs/heads/*:refs/remotes/origin/*

[branch "master"]
remote = origin
merge = refs/heads/master
After this is done, you commit the changes but there is still the below commands to run to be able to run PUSH from Visual Studio Code,

git config --global credential.helper wincred
git config --global user.name "YOUR NAME"
git config --global user.email "YOUR EMAIL ADDRESS"


Thursday, May 21, 2015

Get Ionic framework working behind proxy

I have the error to create a new ionic project when running the command in windows 7
ionic start myproject

The solution is to set up the MAGIC environment variable in the computer settings, then it works.
http_proxy=http://username:password@hostname:port;

Wednesday, May 6, 2015

Error to download bower package in Visual studio 2015 RC when you are in corporate proxy

1. add a .bowerrc file in project,
{
"proxy": "http://192.168.11.22:8080",
"https-proxy":"http://192.168.11.22:8080"
}

2. Install Git seperately

3. go to command prompt and run the following cmd
git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080
git config --global https.proxy https://proxyuser:proxypwd@proxy.server.com:8080

Tuesday, May 5, 2015

Error to download npm package in Visual studio 2015 when you are in corporate proxy

This is the command to run to set up the proxy,

npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080

But where to run this command, the npm.cmd is in,
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External

Open a command prompt as administrator and run the npm config ...
Then it worked.