Sunday 3 July 2016

How to Install XAMPP in ubuntu?

Now let’s see how to installing XAMPP 1.8.3 with PHP 5.5 in Ubuntu and derivatives, but no other previous Xampp 1.8.2 with PHP 5.4 can also be installed by following the same instructions. XAMPP 1.8.3, Tested on Ubuntu 13.10 (64 bit) without problems.
Step 1. Open terminal and download XAMPP 1.8.3 package.
for 32-bit:
wget http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/1.8.3/xampp-linux-1.8.3-2-installer.run/download
for 64-bit:
wget http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/1.8.3/xampp-linux-x64-1.8.3-2-installer.run/download
Step 2. After that, Change xampp package installer to executable then run to installing with following command:
sudo chmod +x xampp-linux-x64-1.8.3-2-installer.run
sudo ./xampp-linux-x64-1.8.3-2-installer.run
The window installation wizard will appear:
Installation wizard XAMPP 1
Click “Next”. Another appears:
Installation wizard XAMPP 2
Click “Next” again. And you will go to the next window:
Installation wizard XAMPP 3
Click “Next” again. And will to the following:
Installation wizard XAMPP 4
Uncheck: “Learn more about BitNami for XAMPP”
And click “Next”
Installation wizard XAMPP 5
Click Next again. Wait for the installation:
Installation wizard XAMPP 1
When finished, this will be the last window:
Setup_199
When you checked “launch XAMPP” before clicking finish A page will open in your browser,  If the page does not open automatically, go into your browser’s address and type http://localhost/xampp
To stop the XAMPP service:
sudo /opt/lampp/lampp stop
To start the XAMPP service:
sudo /opt/lampp/lampp start
To open the page of XAMPP, whenever you want, type in the address bar of your browser: http://localhost/xampp/
XAMPP for Linux 1.8.2-3 -Ubuntu
Basic Configuration
If you want XAMPP to start automatically when you restart your system, add a command line in “rc.local” file. Run:
sudo nano /etc/rc.local
The file is opened for editing. And where was this:
#! /bin/ bash
# 
# rc.local 
# 
# This script is executed at the end of each multiuser runlevel. 
# Make sure que the script will "exit 0" on success or any other 
# value on error. 
# 
# In order to enable or disable this script just change the execution 
# bits. 
# 
# By default this script does nothing.
/opt/lampp/lampp start
exit 0
I added a line just before the “exit 0.” Save and close the file. When you restart your system, the command that was added runs and starts XAMPP. . Note: if anyone knows a more “correct” way to autostart XAMPP, please comment Lastly.
If you have to set passwords XAMPP. To do this, run:
sudo /opt/lampp/lampp security
Questions on various passwords will be made. Would be appreciated define what Restart XAMPP:
sudo /opt/lampp/lampp restart
Or simply use the graphical interface of the program to start and stop the web server
XAMPP 1.8.2 ubuntu

Friday 1 July 2016

How to install Browsersync?

  1. 1. Install Node.js

    Browsersync is a module for Node.js, a platform for fast network applications. There are convenientinstallers for MacOS, Windows and Linux.
  2. 2. Install Browsersync

    The Node.js package manager (npm) is used to install Browsersync from a repository. Open a terminal window and run the following command:
    npm install -g browser-sync
    You’re telling the package manager to download the Browsersync files and install them globally so they’re available to all your projects.
  3. 3. Start Browsersync

    A basic use is to watch all CSS files in the css directory and update connected browsers if a change occurs. Navigate your terminal window to a project and run the appropriate command:

    Static sites

    If you’re only using .html files, you’ll need to use the server mode. Browsersync will start a mini-server and provide a URL to view your site.
    browser-sync start --server --files "css/*.css"

    Dynamic sites

    If you’re already running a local server with PHP or similar, you’ll need to use the proxy mode. Browsersync will wrap your vhost with a proxy URL to view your site.
    browser-sync start --proxy "myproject.dev" --files "css/*.css"

Thursday 30 June 2016

ReferenceError: sass is not defined at Gulp.

Something like this will compile your Sass files:
'use strict';
 
var gulp = require('gulp');
var sass = require('gulp-sass'); // make sure you add this line
 
gulp.task('sass', function () {
  return gulp.src('./sass/**/*.scss')
    .pipe(sass().on('error', sass.logError))
    .pipe(gulp.dest('./css'));
});
 
gulp.task('sass:watch', function () {
  gulp.watch('./sass/**/*.scss', ['sass']);
});
You can also compile synchronously, doing something like this:
'use strict';
 
var gulp = require('gulp');
var sass = require('gulp-sass'); //make sure you add this line
 
gulp.task('sass', function () {
  return gulp.src('./sass/**/*.scss')
    .pipe(sass.sync().on('error', sass.logError))
    .pipe(gulp.dest('./css'));
});
 
gulp.task('sass:watch', function () {
  gulp.watch('./sass/**/*.scss', ['sass']);
});
Pass in options just like you would for node-sass; they will be passed along just as if you were using node-sass. Except for the data option which is used by gulp-sass internally. Using the file option is also unsupported and results in undefined behaviour that may change without notice.
For example:
gulp.task('sass', function () {
 return gulp.src('./sass/**/*.scss')
   .pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
   .pipe(gulp.dest('./css'));
});
gulp-sass can be used in tandem with gulp-sourcemaps to generate source maps for the Sass to CSS compilation. You will need to initialize gulp-sourcemaps prior to running gulp-sass and write the source maps after.
var sourcemaps = require('gulp-sourcemaps');
 
gulp.task('sass', function () {
 return gulp.src('./sass/**/*.scss')
  .pipe(sourcemaps.init())
  .pipe(sass().on('error', sass.logError))
  .pipe(sourcemaps.write())
  .pipe(gulp.dest('./css'));
});
By default, gulp-sourcemaps writes the source maps inline in the compiled CSS files. To write them to a separate file, specify a path relative to the gulp.dest() destination in the sourcemaps.write() function.
var sourcemaps = require('gulp-sourcemaps');
gulp.task('sass', function () {
 return gulp.src('./sass/**/*.scss')
  .pipe(sourcemaps.init())
  .pipe(sass().on('error', sass.logError))
  .pipe(sourcemaps.write('./maps'))
  .pipe(gulp.dest('./css'));
});

Issues

gulp-sass is a very light-weight wrapper around node-sass, which in turn is a Node binding for libsass, which in turn is a port of Sass. Because of this, the issue you're having likely isn't a gulp-sass issue, but an issue with one of those three projects.
If you have a feature request/question how Sass works/concerns on how your Sass gets compiled/errors in your compiling, it's likely a libsass or Sass issue and you should file your issue with one of those projects.
If you're having problems with the options you're passing in, it's likely a node-sass or libsass issue and you should file your issue with one of those projects.
We may, in the course of resolving issues, direct you to one of these other projects. If we do so, please follow up by searching that project's issue queue (both open and closed) for your problem and, if it doesn't exist, filing an issue with them.