Techy Things

Add timeout to java mail transport 0

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 example 0

Gulp usage example

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 –save-dev gulp-shell  ...

Git log with full diff 0

Git log with full diff

Git log full-text with search git┬álog -p | grep <SEARCH_STRING> Git log of a single file $> git log -p –follow <PATH/FILENAME> Git log of a single commit todo Git diff between two branches...

How to install gcc-4.X on Mac OSX 10.7.X 0

How to install gcc-4.X on Mac OSX 10.7.X

1. Uninstall MacPort $> sudo port -fp uninstall installed –https://guide.macports.org/chunked/installing.macports.uninstalling.html This is needed to install some package with Brew – Qt for example. Otherwise you will get this error : ==> make 1 error...

error: libudev.h: No such file or directory 0

error: libudev.h: No such file or directory

Problem: error: libudev.h: No such file or directory Solution: $> sudo yum install libudev-devel Another related error : /usr/bin/ld: skipping incompatible /usr/lib64/libudev.so when searching for -ludev /usr/bin/ld: cannot find -ludev collect2: ld returned 1...