git, Uncategorized

Git Repo Configuration Step By Step

Git Server Configuration on Ubuntu 

Create New Users if not exits: 

sudo useradd safi
Create a New Group for the project 
sudo groupadd testgroup
Add user to the Group : 

Now that the group exists, add the two users to it:

sudo usermod -a -G testgroup safi
sudo usermod -a -G testgroup kafi
View All USER and GROUP: 

All users:

$ getent passwd

All groups:

$ getent group
CREATE A bare repository : at var/www/git/ 
git init –bare <directory> [directory==projectFolder.git]
All Set Now Need to give the write permission to the group for
this Repository.

Now all that’s left is to set the permissions on the directory:

sudo chgrp -R testgroup /path/to/the/directory
sudo chmod -R 770 /path/to/the/directory
References :
Standard
Uncategorized

Drupal8 Development Environment With VM and Vagrant

As its Drupal 8 need a Rich Server configuration. If we follow the Local Environment development it need to change configurations. But we could up and run the VDD () and get start with Drupal 8 without knowing the Server configuration. :)

 

Installing Virtualbox:

Navigate to https://www.virtualbox.org/wiki/Downloads and grab a copy of the installer for your OS/Platform, and install it!

Installing Vagrant:

Make sure you followed the step above and installed Virtualbox. Otherwise, you won’t be able to install Vagrant. Navigate to http://www.vagrantup.com/downloads.html and, again, grab a copy of the installer for your OS/Platform, and install it!

If you previously had Virtualbox installed, make sure to back up your current VMs before proceeding with this tutorial.

Clone the VDD repo in to your home directory (~/):


git clone --branch 8.x-1.x http://git.drupal.org/project/vdd.git
cd vdd 

VDD automatically creates drush aliases for each site in the config.json file at

~/vdd/consig.json

vagrant up

Once this is complete, you’ll see the following in the terminal:


==> default: =============================================================
==> default: Install finished! Visit http://192.168.44.44 in your browser.
==> default: =============================================================

In Windows, edit the following file as an administrator in your text editor of choice:

C:\Windows\System32\drivers\etc\hosts

I’m only going to add an entry for Drupal 8 here, as the VDD summary page noted above (http://192.168.44.44) describes the entries you may wish to add for other Drupal versions.


192.168.44.44 drupal8.dev
192.168.44.44 www.drupal8.dev

Now issue the following command to reload your VM configuration, from the VDD root directory on your host system:

vagrant reload

To install Drupal 8 on your new virtual machine :

vagrant ssh


By - William Hetherington

Ref:  https://drupalize.me/blog/201512/tutorial-vagrant-drupal-8-development

Standard
Css

Center an element Vertically and Horaizontally

Setting top: 0; left: 0; bottom: 0; right: 0; gives the browser a new bounding box for the block. At this point the block will fill all available space in its offset parent, which is the body or position: relative; container.
W3.org: If none of the three [top, bottom, height] are ‘auto’: If both ‘margin-top’ and ‘margin-bottom’ are ‘auto’, solve the equation under the extra constraint that the two margins get equal values. AKA: center the block vertically.


Hello

You are looking into the absolute Centering element

 

 


.center-container{
position: relative;
background: gray;
background: #2e5f3e;
color: #4fa46b;
width: 100%;
height: 400px;
clear: both;
}

.absolute-center{
width: 50%;
height: 50%;
max-height: 150px;
position: absolute;
overflow: auto;
margin: auto;
top: 0; left: 0; bottom: 0; right: 0;
padding: 20px;
background: orange;
color: white;
}

Code Pan Example : http://codepen.io/moshiuramit/pen/jWqwmG

REF:  http://codepen.io/shshaw/details/gEiDt

Standard
Drupal, Uncategorized

Drush on Windows 10/8.1

Download the Drush project from drupal.org.

Installation on Windows

  1. Install additional applications:
  2. Use bsdtar for tar, it’s more reliable. Copy the file C:\Program Files\GnuWin32\bin\bsdtar.exe toC:\Program Files\GnuWin32\bin\tar.exe

    http://drupal.org/node/594744

  3. Setup PATH environment variables for Drush, PHP, and tar/get/wget binaries installed above:

    Control Panel > System > Advanced System Settings > Environment Variables

    Select Path and click Edit.

    Append your paths (separated by semicolons) to php.exe, drush.bat and tar/get/wget binaries to the Path Variable value. This field is not so usable as a textfield. You’ll probably want to copy the existing value to a text editor, append your new entries and paste everything back into the field.

    You’re paths should look something like this, but they may be different depending on your setup.

    ;C:\wamp\bin\php\php5.3.0;C:\drush;C:\Program Files\GnuWin32\bin

    MySQL Path

    Check to make sure your Path variable includes the path to the folder containing mysql.exe. While this isn’t necessary to use Drush, being able to use MySQL via the command line comes in handy.

    ;C:\wamp\bin\mysql\mysql5.1.36\bin 

    If you have an open command window, you will need to reopen it to refresh your path variables.

  4. Edit drush.bat located in the root of your Drush folder to include the full path to your PHP installation.
    @C:\wamp\bin\php\php5.3.0\php.exe "%~dp0drush.php" %* 

Testing your Drush Setup

Open the Command Line, type drush or drush --help and hit enter. If installed correctly you should see a help listing of Drush commands.

Ref: http://ninjagirl.com/posts/2010/06/installing-drush-windows

http://whaaat.com/installing-drush-8-using-composer

Standard