Skip to content

Instantly share code, notes, and snippets.

View biswajitpanday's full-sized avatar
🎯
Focusing

Biswajit Panday biswajitpanday

🎯
Focusing
View GitHub Profile
@sarathsp06
sarathsp06 / angular_relativeDate.js
Last active May 9, 2019 09:07
Angular filter to convert a time in milliseconds to relative human readable time
(function(){
"use strict":
angular.module('ng-relativeDate',[])
.filter('ngrelativeDate',function(){
/**
* [humanreadableDate converts the timestamp into human readable time ]
* @param {Int} timestamp - time as number of milliseconds since 1970/01/01:
* @return {string} relative time corresponding to timestamp
*/
@appastair
appastair / jsonp.js
Last active August 23, 2020 17:52
Cross-domain JSONP Example (jQuery/PHP)
jQuery(function($){
$.ajax({
type: 'GET',
url: '//remote.org/jsonp.php',
data: {
field: 'value'
},
dataType: 'jsonp'
crossDomain: true,
}).done(function(response){