Monthly Archive: December 2014

Best ways to center align div with CSS 0

Best ways to center align div with CSS

Center align division with CSS Solution #1 - margin 0 auto This is an often-used and widely supported method and clean. However the drawback is you have to specify the width of the item....

SASS files (.scss) to CSS watcher in WebStorm 0

SASS files (.scss) to CSS watcher in WebStorm

  I was originally converting SASS to CSS using external gulpfile.js to watch *.scss files and convert with gulp-sass and gulp-watch. I then found out that WebStorm has a built-in watch capability that is...

Add timeout to java mail transport 2

Add timeout to java mail transport

props.put("mail.smtp.connectiontimeout", "5000"); props.put("mail.smtp.timeout", "5000"); try { //Set the host smtp address Properties props = new Properties(); if (Integer.parseInt(port) == 465) // SSL { props.put("mail.smtp.auth", "true"); props.put("mail.smtp.socketFactory.port", port); props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory"); props.put("mail.smtp.socketFactory.fallback", "true"); } else {...

usemin fails with Arguments to path.join must be strings 0

usemin fails with Arguments to path.join must be strings

Solution Wrong : <!-- build:css --> <link href="css/base.css" rel="stylesheet" /> <link href="css/appname.css" rel="stylesheet" /> <!-- endbuild --> Good : <!-- build:css index.css --> <link href="css/base.css" rel="stylesheet" /> <link href="css/appname.css" rel="stylesheet" /> <!-- endbuild -->...

Gulp usage with sass watch, minify and r.js compressor 0

Gulp usage with sass watch, minify and r.js compressor

This is what I use for Gulp in my HTML5 boilerplate Installation : npm install gulp-concat --save-dev npm install gulp-autoprefixer --save-dev npm install gulp-minify-css --save-dev npm install gulp-usemin --save-dev npm install gulp-shell --save-dev npm install gulp-sass --save-dev...