Categories
javascript nodejs

Friendly dates with MongoDB and Moment.js

I’m working on a project where any new comment posted gets tagged with a timestamp in milliseconds (local time). My issue was when I display the comments but I want to compare the saved timestamp with the current time. I need to be able to still keep the saved timestamp and show a humanized version to […]

Categories
gruntjs javascript

Run grunt tasks from child directories

module.exports = function(grunt) { grunt.initConfig({ concat: { options: { banner: ”, separator: ‘;’ }, dist: { src: [“js/libs/script-1.js”, “js/libs/script-2.js”], dest: ‘js/libs/build.js’ } }, uglify: { makeUgly: { files: { Usually medical practitioners prescribe 100mg for sale viagra dose to women above 40years old. Because it is very easy to cialis generico uk take and the […]

Categories
javascript jquery

Using XDomainRequest object with jQuery

This primairly to work with IE9 and below. IE10+ will just use the jQuery.Ajax method. var leadDataObj = { “firstname”: “Darth”, “lastname”: “Vader”, “age”: “78”, “email”: “amyourfather@hotmail.com” }; if ($.browser.msie && window.XDomainRequest && parseInt($.browser.version, 10)